haskell / c2hs

c2hs is a pre-processor for Haskell FFI bindings to C libraries
http://hackage.haskell.org/package/c2hs
Other
199 stars 51 forks source link

c2hs: Prelude.head: empty list #295

Open yanankeji opened 3 months ago

yanankeji commented 3 months ago

when i c2hs or stack build bz2: [root@localhost src]# c2hs -o Codec/Compression/BZip/Foreign/Common.hs Codec/Compression/BZip/Foreign/Common.chs c2hs: Prelude.head: empty list CallStack (from HasCallStack): error, called at libraries/base/GHC/List.hs:1644:3 in base:GHC.List errorEmptyList, called at libraries/base/GHC/List.hs:87:11 in base:GHC.List badHead, called at libraries/base/GHC/List.hs:83:28 in base:GHC.List head, called at src/Language/C/Parser/Lexer.x:468:53 in language-c-0.9.3-AGIXBdjoRqt3hZDWQGEe6P:Language.C.Parser.Lexer

jcmartin commented 1 week ago

This appears to have been fixed in this commit in the language-c package: https://github.com/visq/language-c/commit/4da4bab0e339f0c0a52c00c4b46a512709aa10dc