How to access defines and enums in a convenient way?

Sven Panne Sven.Panne at informatik.uni-muenchen.de
Fri Jun 6 05:22:55 EDT 2003


Martin Norbäck wrote:
 > I am doing some wrappers for c functions, and I need to access
 > defines, enums, and structs. [...]

Have a look at hsc2hs:

    http://haskell.org/ghc/docs/latest/html/users_guide/hsc2hs.html

The hierachical libraries contain a lot of examples. But note that the
generated Haskell code is *not* portable across platforms, so you have
to ship your *.hsc files if you want that.

Cheers,
    S.





More information about the FFI mailing list