Questions tagged [c2hsc]

c2hsc is a utility for creating .hsc files from C API header files.

c2hsc is a utility for creating .hsc files from C API header files. It is available on Hackage here: https://hackage.haskell.org/package/c2hsc and is maintained and developed on github here.

1 questions
3
votes
1 answer

Interfacing C unions in Haskell via c2hsc and hsc2hs

While using c2hsc and hsc2hs saves me a lot of work, I've run into some trouble when trying to create bindings for C unions. For example, given the C structure typedef struct { int tag; union { char a; double b; …
David
  • 8,275
  • 5
  • 26
  • 36