haskell / c2hs

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

No marshaller for CULLong and C2HSImp.CULLong #242

Closed vmchale closed 4 years ago

vmchale commented 4 years ago

This seems to be an oversight; I can work around it by using id to marshal in/out.

See e.g. https://github.com/vmchale/lzlib/blob/master/src/Codec/Lzip/Raw.chs#L86.

If I remove the id marshalers I get

c2hs: Errors during expansion of binding hooks:

src/Codec/Lzip/Raw.chs:83: (column 48) [ERROR]  >>> Missing "in" marshaller!
  There is no default marshaller for this combination of Haskell and C type:
  Haskell type: CULLong
  C type      : C2HSImp.CULLong
deech commented 4 years ago

Fixed https://github.com/haskell/c2hs/pull/243. Please close if it works for you.

vmchale commented 4 years ago

Thanks :)