Haskell FFI Binding Modules Generator (HSFFIG) is a tool that takes a C library include file (.h) and generates Haskell Foreign Functions Interface import declarations for all functions, #define's (where possible), enumerations, and structures/unions (to access their members). It is assumed that GNU C Compiler and Preprocessor are used. Auto-generated Haskell modules may be imported into an application to get access to the foreign library's functions and variables.
| Tags | Software Development Code Generators |
|---|---|
| Implementation | C Haskell |
Recent releases


Release Notes: Correct support for C arrays was added. Arrays of any dimension are now represented as pointers to their element type (in fact, the first element, with all zero indices). For structure members that are arrays, an interface was provided for obtaining array dimensions as a list of integers. Code handling structures were refactored. Information about each structure type and structure members is now represented as a Data structure, which is one step towards future versions where arbitrary manipulation by the collection of C declarations will be allowed.


Release Notes: The type alias resolution mechanism was corrected so that it looks deep enough in the simplified declarations tree. As a result of this patch, a construction such as "typedef struct X { int bla; } Y; int (*fun1(Y *, int))(Y *);" is now converted correctly. Without this patch, the first occurrence of "Y" (within the function pointer parameter list) was not mapped into its original type (struct X).


Release Notes: HSFFIG has been released as a Cabal package. The multi-parameter class and structure member access combinators have been moved into a separate library.


Release Notes: This release added import for typedefs as Haskell type aliases. A bug that caused hsffig to crash on anonymously declared enums was fixed. The code was cleaned up and the tutorial was updated.


Release Notes: The code has been cleaned up. Missing features have been added: bit fields support, and direct invocation of functions pointed to by C structure members. A tutorial is now available.
An asynchronous programming framework for Java inspired by Twisted Python.