Module documentation for 0.28.1

This version can be pinned in stack with:[email protected]:85a34026d3dbdeec0958de90073e601c75c2b24438291dae884539b0887ca341,8712

There are no documented modules for this package.

C->Haskell 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. Unlike writing foreign imports by hand (or using
hsc2hs), this ensures that C functions are imported with the
correct Haskell types.

Changes

CHANGES ABOVE THIS POINT ARE FOR VERSIONS AFTER THE MOVE OF THE REPOSITORYTO GITHUB AND ARE DESCRIBED IN THE MAIN ChangeLog FILE.

* toplevel/Main.hs (process): if there is no explicit output file specified, the header file is put in the same directory as the binding file; otherwise, it goes in the directory where the output file is put

* gen/GenHeader.hs (ghFrag): sentries for conditionals must not be turned into internal identifiers, as this spoils later equality tests with identifiers read from the pre-processed header file; bug reported by Axel Simon <[email protected]>

* chs/CHSLexer.hs (haskell): the lexeme for one-line comments shouldn't include the terminating newline, as this removes the newline for following lexemes (eg, CPP directives) and is not really necessary due to the Principle of the Longest Match

* chs/CHSLexer.hs (haskell): Escape characters in Haskell strings haven't been handled correctly in all cases as reported by Volker Wysk <[email protected]>; we also have to handle character constants specially, because '"' is a legal Haskell character constant

* gen/GenBind.hs (mergeMaps): now, the read map overrides any entires for shared keys in the map that is already in the monad; this is so that, if multiple import hooks add entries for shared keys, the textually latest prevails; any local entries are entered after all import hooks anyway

* gen/GenBind.hs (extractCompType): as pointed out by Axel Simon, we can't return `ForeignPtr's from imported foreign functions (setGet): the `accessType' story is largely redundant with the new formulation of `extractCompType', but we still need to check the marshaled type (setGet): `DefinedET' now takes a declaration rather than an identifier as its first argument; this is necessary for anonymous declerators (extractCompType): functions are now extracted correctly

* c/CTrav.hs (isPtrDecl): works on identifiers now and chases declarations (dropPtrDeclr): added

* gen/GenBind.hs: The following patch was contributed by Axel Simon <[email protected]>: `extractCompType' generates addresses of type `Ptr <type>' instead of `Addr' (if `--old-ffi=no', which is the default)

* gen/GenBind.hs (transTabToTransFun): properly handles prefixes in the translation function (enumDef): prefixes are now generally removed from enumerators without the constraint that the prefix has to be removed from all enumerators or none

0.2.0~~~~~29Aug99 full path completed19Aug99 started `lib' part17Aug99 started `gen' part17Aug99 finished the CHS parser and printing routines in `CHS.hs'16Aug99 finished first version of CHS lexer; added `CHS.hs'15Aug99 started `chs' part

0.1.1~~~~~12Aug99 Various fixes to the C lexer and parser; added toplevel/Main.hs and c/C.hs

0.1.0~~~~~03Apr99 Finished first complete version of C lexer and parser27Feb99 starting project