[Haskell] ANNOUNCE: c2hs 0.16.0

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sat Feb 28 09:20:43 EST 2009


c2hs version 0.16.0 is out and is available from hackage

What is c2hs

The c2hs tool assists in the development of Haskell bindings to C
libraries. It extracts interface information from C header files and
generates Haskell code with foreign imports and marshaling.

The major advantages of using c2hs compared to writing foreign imports
by hand (or using hsc2hs) are:

      * Cross-language type safety:
                C functions are imported with the correct Haskell types.

      * Saves time:
                boilerplate marshaling code is generated.

Changes in this release

The major change in this release is that it now uses the Language.C
library. This brings the code full circle. Benedikt Huber split out and
developed the Language.C library from the C parser I originally wrote
for c2hs some years ago.

Other changes since 0.15.x:
      * Works better on OSX, it now uses gcc -E to do the pre-processing
        of C header files. Previously it used cpp, however on OSX the
        cpp program appears to operate in an antiquated compatibility
      * "enum hooks" are now implemented but not yet documented
      * A couple fixes in the default mapping of C names to Haskell
      * A number of other bugs fixes.


Benedikt Huber gets the credit for majority of the work in this release.
Thanks also to John Lato for numerous cleanup patches.


Home page:

Bug tracker:


More information about the Haskell mailing list