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.
In Haskell, data type declarations, Parsec parsers, and HughesPJ pretty-printers very much resemble each other; supplying all three is virtuous, but involves a large amount of code duplication. syntran is a code generator designed to reduce the amount of duplication. Its source is similar to a Parsec LanguageDef-using parser, annotated with the unique information from the data type declaration and the pretty-printer which would normally not be found in a parser. It separates this information out to generate pure Haskell.
Happy is a parser generator system for Haskell, similar to the tool 'yacc' for C. Like yacc, it takes a file containing an annotated BNF specification of a grammar and produces a Haskell module containing a parser for the grammar. It is flexible: you can have several Happy parsers in the same program, and several entry points to a single grammar. It can work in conjunction with a lexical analyser supplied by the user (either hand-written or generated by another program), or it can parse a stream of characters directly (but this isn't practical in most cases).
DrIFT is a type sensitive preprocessor for Haskell. It extracts type declarations and directives from modules and applies rules to them which generate code. It is intended that the user can add new rules as required. DrIFT automates instance derivation for classes that aren't supported by the standard compilers. In addition, instances can be produced in separate modules to that containing the type declaration. This allows instances to be derived for a type after the original module has been compiled. Simple utility functions can also be produced from a type.
Knit is a new component definition and linking language that can be used with C and assembly code. Knit supports component definitions that require little or no modification to existing code. It automatically schedules component initializers and finalizers and provides an extensible constraint system to detect subtle errors in component composition. Knit provides cross-module inlining that largely eliminates the overheads of componentization, supports component hierarchies, and supports cyclic component dependencies. Knit can be used for any C program, but is especially well suited for use in systems that have many separate components, multiple implementations of the same component, intricate initialization requirements, complex component interdependencies, low-level code and embedded systems, or code that is used in radically different configurations.
C->Haskell is an interface generator that simplifies the development of Haskell bindings to C libraries. The tool processes existing C header files that determine data layout and function signatures on the C side in conjunction with Haskell modules that specify Haskell-side type signatures and marshaling details. Hooks embedded in the Haskell code signal access to C structures and functions; they are expanded by the interfacing tool in dependence on information from the corresponding C header file.