[Haskell] ANNOUNCE: c2hs 0.16.3

Duncan Coutts duncan.coutts at googlemail.com
Thu Mar 24 14:07:42 CET 2011


All,

c2hs version 0.16.3 is out and is available from hackage
http://hackage.haskell.org/package/c2hs


What is c2hs
============

c2hs is an FFI preprocessor tool, a bit like hsc2hs, that helps with the
development of Haskell bindings to C libraries.

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.

It works by extracting interface information from C header files and it
generates Haskell code with foreign imports and marshalling.


Changes in this release
=======================

      * In and out marshallers may now have arguments, rather than just
        being single function names.
      * Foreign function imports will now use stdcall if the C headers
        specify this calling convention. This will help with bindings to
        some C libraries on Windows.
      * New {# alignof #} hook, like the existing {# sizeof #} hook.
        This is useful for the alignment in Storable instances.
      * Fewer marshalling functions are needed from the bundled C2HS
        module. The trend is towards eliminating the need for any
        axillary marshalling module.


Credits
=======

Thanks to Jonathan Rockway, ron at gamr7.com and Dmitry Astapov for
contributions to this release.

Links
=====

Home page:
http://www.cse.unsw.edu.au/~chak/haskell/c2hs/

Bug tracker:
http://hackage.haskell.org/trac/c2hs/


Duncan




More information about the Haskell mailing list