haskell / haskell/c2hs

`makeArg` pattern match failure

Open
#210 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
211
Forks
52
PR merge metrics
No merged PRs in 30d

Description

I've made a repository that possibly highlights a bug in `c2hs`:

https://github.com/mitchellwrosen/language-c-issue-54

To reproduce, run:

```
./build
```

(requires new-ish `cabal-install`, probably 2.0+).

On my machine, this produces:

```
Resolving dependencies...
Build profile: -w ghc-8.4.3 -O1
In order, the following will be built (use -v for more details):
- foo-0 (lib:foo) (first run)
Configuring foo-0...
Preprocessing library for foo-0..
c2hs: Errors during generation of C wrappers:

./Foo.chs:9: (column 4) [ERROR] >>> Internal wrapper error!
Something went wrong generating a bare structure wrapper.
makeArg:arg=False
cdecl=CDecl [CTypeSpec (CTypeDef (Ident "WINDOW" 143904934 (NodeInfo ("./foo.h": line 1635) (("./foo.h": line 1635),6) (Name {nameId = 4053}))) (NodeInfo ("./foo.h": line 1635) (("./foo.h": line 1635),6) (Name {nameId = 4054})))] [(Just (CDeclr Nothing [CPtrDeclr [] (NodeInfo ("./foo.h": line 1635) (("./foo.h": line 1635),1) (Name {nameId = 4055}))] Nothing [] (OnlyPos (,-1))),Nothing,Nothing)] (NodeInfo ("./foo.h": line 1635) (("./foo.h": line 1635),1) (Name {nameId = 4056}))
idx=1
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.