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

Is it possible to have C2HS know the "type" definition? #219

Open Magicloud opened 5 years ago

Magicloud commented 5 years ago

Many types have builtin marshallers, like Int, Double. But if I had type X = Double, then I had to give explicit marshaller when using X.

Is it possible to have C2HS remember the type "X" somehow, and generate code just like it was "Double"?