c2hs
C->Haskell FFI tool that gives some cross-language type safety
http://github.com/haskell/c2hs
Version on this page: | 0.25.2 |
LTS Haskell 23.21: | 0.28.8@rev:3 |
Stackage Nightly 2025-05-07: | 0.28.8@rev:3 |
Latest on Hackage: | 0.28.8@rev:3 |
GPL-2.0-only licensed by Manuel M T Chakravarty
This version can be pinned in stack with:
c2hs-0.25.2@sha256:379fbe62622a4dae1cf406e69c75414eb166b0762480f680609e8cba37dd262a,7963
Module documentation for 0.25.2
There are no documented modules for this package.
Depends on 9 packages(full list with versions):
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 REPOSITORY
TO GITHUB AND ARE DESCRIBED IN THE MAIN ChangeLog FILE.
2005-12-12 Manuel M T Chakravarty <[email protected]>
* c2hs/gen/GenBind.hs: When translating the target type of a
pointer hook into a Haskell type, don't take the pointer hook
alias map into account.
* c2hs.cabal: version 0.14.5
* c2hs/gen/GenBind.hs: Suppress code generation if requested
* c2hs/chs/CHS.hs: Added `nocode' to pointer hooks
* c2hs/chs/CHSLexer.hs: Added `nocode'
2005-12-05 Jelmer Vernooij <[email protected]>
* c2hs/c/CTrav.hs: only match in `checkForOneCUName' if there are
no indirections
2005-12-05 Jelmer Vernooij <[email protected]>
* c2hs/gen/GenBind.hs: support mapping struct and union names to haskell
types
* c2hs/c/CTrav.hs: added `checkForOneCUName'
Fri Nov 25 10:54:56 EST 2005 Jelmer Vernooij <[email protected]>
* add prettify functions for structs, enums and unions
2005-08-10 Manuel M T Chakravarty <[email protected]>
* c2hs/gen/GBMonad.hs: apply `upcaseFirstLetter' and
`downcaseFirstLetter' if specified
* c2hs/chs/CHS.hs: added `upcaseFirstLetter' and `downcaseFirstLetter'
2005-08-09 Manuel M T Chakravarty <[email protected]>
* c2hs/gen/CInfo.hs: exports `getPlatform'
2005-08-08 Manuel M T Chakravarty <[email protected]>
* c2hs/toplevel/Main.hs: Added --platform switch for cross compilation
* c2hs.cabal: 0.14.3
2005-08-08 Manuel M T Chakravarty <[email protected]>
* c2hs.cabal: 0.14.2
* Support asm construct (Duncon Coutts)
* Hierachical modules (Duncon Coutts)
2005-07-13 Duncan Coutts <[email protected]>
* Remove old C lexer & parser and replace them with new ones using
alex and happy
2005-07-14 Manuel M. T. Chakravarty <[email protected]>
* C2HS library as a single file added to the generated binding
code
2005-07-13 Manuel M. T. Chakravarty <[email protected]>
* Cabal-ised the build system
* c2hs.cabal (Version): 0.14.0
2005-05-18 Manuel M. T. Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.13.6
2005-03-14 Manuel M. T. Chakravarty <[email protected]>
* c/CParser.hs: Allow lists of GNU C attributes (patch contributed
by Duncan Coutts <[email protected]>)
* chs/CHSLexer.hs (instr): Allow 8-bit characters (Volker Wysk
<[email protected]> requested support for umlauts in strings)
* toplevel/Version.hs (versnum): 0.13.5
2004-10-18 Manuel M. T. Chakravarty <[email protected]>
* chs/CHS.hs (showCHSModule): Don't add extra '\n' after directive
during pretty printing
* chs/CHSLexer.hs (cpp): forgot to adapt lexing of #c to the new
situation where directives don't consume the following '\n'
2004-10-17 Manuel M. T. Chakravarty <[email protected]>
* c2hs.conf.in: Modernised package deps and options
* gen/GenBind.hs (expandHook): We use the shadow identifier for
generating the Haskell name.
* chs/CHSLexer.hs (identOrKW): Identifier may be put in single quotes
* toplevel/Version.hs (versnum): 0.13.4
2004-10-13 Manuel M. T. Chakravarty <[email protected]>
* chs/CHSLexer.hs (cpp): fixed lexing of directives such that they
don't consume the '\n' that ends them
* toplevel/Version.hs (versnum): 0.13.3
* toplevel/Main.hs (Flag): Added `--output-dir' option and removed
`--old-ffi'.
* gen/GenBind.hs (noDftMarshErr): better error message when
default marshallers are not available
(isIntegralCPrimType): handle C chars as integral types for marshalling
* 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
2004-10-09 Manuel M. T. Chakravarty <[email protected]>
* toplevel/Main.hs (process): store header file name in switch board
* state/Switches.hs: Store the name of the generated header file
(needed to generate complete foreign import declarations)
* gen/GenBind.hs (foreignImport): Add name of header file to
extent strings of generated foreign import declarations
* c/CAttrs.hs (applyPrefix): never create empty shadow identifiers
2004-10-08 Manuel M. T. Chakravarty <[email protected]>
* chs/CHS.hs (dumpCHS): Header doesn't contain the "-- **"
sequence anymore that Haddock dislikes.
* c/CParser.hs (parseCStructUnion): We allow structs and unions
with no declarations, as GNU C does
* toplevel/Version.hs (versnum): 0.13.2
2004-08-21 Manuel M. T. Chakravarty <[email protected]>
* tests/Makefile: use configured $HC (courtesy Don Stewart
<[email protected]>)
2004-06-11 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (pointerDef): Adapted to the standard interface
for foreign pointers
2004-06-10 Manuel M. T. Chakravarty <[email protected]>
* c/CParser.hs: Added parsing of function bodies
* c/CLexer.hs: Added tokens occuring in the statement syntax
2004-06-09 Manuel M. T. Chakravarty <[email protected]>
* c/CAST.hs: Added function bodies
* c/CPretty.hs: Added `auto' and `register' storage specifiers
* c/CLexer.hs: Added tokens for `auto' and `register' keywords
* toplevel/Version.hs (versnum): 0.13.1
2004-05-15 Manuel M. T. Chakravarty <[email protected]>
* c/CParser.hs (parseCHeader): Duncan Coutts
<[email protected]> identified a space (and
time) leak in the old typedef-name morphing setup; this has been
rewritten now
2004-05-14 Manuel M. T. Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.13.0 "Pressing Forward"
2003-10-20 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (foreignImport): brought generated foreign import
declarations in line with FFI Addendum
* toplevel/C2HSConfig.hs.in: removed legacy FFI support
* configure.in: removed legacy FFI support
* mk/config.mk.in: removed legacy FFI support
* lib/Makefile: Removed all deprecated code and support code for
old versions of the FFI
* toplevel/Version.hs (versnum): 0.12.1
2003-10-19 Manuel M T Chakravarty <[email protected]>
* c2hs.spec.in: Contributions by Jens Petersen
<[email protected]>: specify ghc version to build with;
don't redundantly provide c2hs; separate library out into
separate ghc version specific subpackage; put docs into separate
subpackage; disable empty debuginfo subpackage generation -
remove buildroot before installing; remove installed doc files,
since they're explicitly listed
* c/CLexer.hs (linedir): allow an arbitrary number of ints after
the filename in a #line directive; problem was first reported by Sean
Seefried <[email protected]>
* gen/GBMonad.hs (delayCode): Generate appropriate line numbers
for delayed code; problem reported by Sean Seefried
<[email protected]>
* chs/CHS.hs (showCHSModule): Never generate negative line numbers
* toplevel/Version.hs (versnum): 0.12.0 "Springtime"
2003-06-10 Manuel M T Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.11.5
2003-05-30 Jens Petersen <[email protected]>
* configure.in: Search for compiler named HC too.
2003-05-30 Jens Petersen <[email protected]>
* c2hs.spec.in (Version): Set directly.
(Release): Ditto.
(%prep): Quieten setup.
(%build): Use configure macro.
(%install): Use makeinstall macro.
(%post): Use _bindir.
(%files): Make root own files. Use _bindir, _libdir and _mandir.
2003-05-22 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (Ord): Need instance for `<=' for indirectly
defined `compare'; bug reported by Ian Lynagh <[email protected]>
* toplevel/Version.hs (versnum): 0.11.4
2003-04-16 Manuel M T Chakravarty <[email protected]>
* 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]>
* toplevel/Version.hs (versnum): 0.11.3
2003-03-04 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (evalConstCExpr): supporting enumerators in
constant expressions
* toplevel/Version.hs (versnum): 0.11.2
2003-02-13 Manuel M T Chakravarty <[email protected]>
* chs/CHS.hs: removed the "header" tag (we now support the CPP
#include directive)
* Configuration-related patch by Ian Lynagh <[email protected]> that
removes issues with GHC 5.05
2003-02-12 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (expandFrag): Expanding conditionals
* 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
* gen/GenHeader.hs: debugging
2003-02-05 Manuel M T Chakravarty <[email protected]>
* gen/GenHeader.hs: New module extracting CPP directives and
inline-C from a .chs file
* toplevel/Main.hs (process): Integrated generation of custom C header
* c/CParser.hs (parseCHeader): Header file may be empty
2003-02-01 Manuel M T Chakravarty <[email protected]>
* chs/CHS.hs (showCHSModule): emitting GHC line pragmas
(CHSFrag): added representations for cpp directives and inline-C
code, and adapted the functions processind the representations
* chs/CHSLexer.hs: Added support for pre-processor directives and
inline-C code
2003-01-31 Manuel M T Chakravarty <[email protected]>
* toplevel/Main.hs (process): Now reading the binding module
before the C header
2003-01-30 Manuel M T Chakravarty <[email protected]>
* c/CParser.hs: Allow more GNU attributes contributed by Axel
Simon <[email protected]>
2002-09-17 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* gen/GBMonad.hs (HsObject): working around a problem with
deriving Read in GHC 5.04.1
2002-09-16 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* Makefile (ghci): target to load all of c2hs into GHCi
2002-09-13 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* toplevel/c2hs_config.c: removed the `signed' modifier on
suggestion of Seth Kurtzberg <[email protected]> as it apparently
confuses the Solaris 8 C compiler
2002-09-07 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* c2hs.spec.in: add post install and uninstall scripts to register
and deregister the package with GHC
* configure.in: fixed REQUIRES_HASKELL for ghc
* toplevel/Version.hs (versnum): 0.10.17
2002-09-06 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* toplevel/C2HSConfig.hs.in (cppopts): Added "-x c" on suggestion
by Axel Simon
* Makefile (install): using --update-package instead of --add-package
* configure.in: Fixed some nhc98 related issues
* toplevel/Version.hs (versnum): 0.10.16
2002-07-12 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* c2hs-config.in: added the system for which the package was
compiled to the output of the --version option
* c/CParser.hs (parseCStructUnion): Allow __extension__ in
structure declarations and added `inline'.
* c/CAST.hs: Added `inline'
* c/CLexer.hs: Added support for `inline' keyword
2002-07-06 Manuel M T Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.10.15
2002-05-16 Manuel M T Chakravarty <[email protected]>
* lib/C2HSMarsh.hs: added support for bit masks
* toplevel/Version.hs (versnum): 0.10.14
2002-05-10 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (setGet): corrected bug in bit fiddling
2002-05-02 Manuel M T Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.10.13
2002-04-16 Manuel M T Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.10.12
2002-03-20 Manuel M T Chakravarty <[email protected]>
* chs/CHSLexer.hs (haskell): Debug the handling of character literals
* toplevel/Version.hs (versnum): 0.10.11
2002-03-12 Manuel M T Chakravarty <[email protected]>
* c2hs.spec.in: we now require the Haskell compiler to be the one
for which the package was build
* Makefile: adapted to revised build system
* toplevel/Version.hs (versnum): 0.10.10
2002-03-06 Manuel M T Chakravarty <[email protected]>
* 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
2002-03-03 Manuel M T Chakravarty <[email protected]>
* configure.in: Package handling fix by Jens Petersen
* toplevel/Version.hs (versnum): 0.10.9
2002-02-25 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs: debugging
2002-02-24 Manuel M T Chakravarty <[email protected]>
* chs/CHS.hs (parseOptAs): `^' as synonym for previous identifier,
but with underscores rewritten to caps
* chs/CHSLexer.hs: added `CHSTokHat'
2002-02-23 Manuel M T Chakravarty <[email protected]>
* lib/C2HSMarsh.hs: added some more convenience functions
2002-02-21 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs: Completed processing of function hooks
2002-02-18 Manuel M T Chakravarty <[email protected]>
* chs/CHSLexer.hs: Added `CHSTokMinus'
* chs/CHS.hs: Revised the syntax of fun hooks
* chs/CHSLexer.hs: Added `CHSTokAmp' (representing `&')
* gen/GenBind.hs (foreignImport): factorised the code for call
hook generation to make those portions that are also useful for
fun hooks reusable
(expandHook): implemented fun hooks
* gen/GBMonad.hs: extracted monad-related code from `GenBind.hs'
* gen/GenBind.hs: split off the monad definition and operations
into `GBMonad.hs'
2002-02-17 Manuel M T Chakravarty <[email protected]>
* chs/CHSLexer.hs: introduced `hsverb' tokens
* chs/CHS.hs: `pure' instead of `fun' to indicate calls to pure
C functions (`fun' retained for backwards compatibility)
* chs/CHSLexer.hs: introduced the keyword `pure'
2002-02-13 Manuel M T Chakravarty <[email protected]>
* Makefile: adapted to using GHC package management
2002-02-11 Manuel M T Chakravarty <[email protected]>
* lib/Makefile (depend): increase portability
2002-02-06 Manuel M T Chakravarty <[email protected]>
* configure.in: probe for `grep'
2002-02-05 Manuel M T Chakravarty <[email protected]>
* aclocal.m4 (CTK_GHC_VERSION): no \+ in sed on Solaris
* toplevel/Version.hs (versnum): 0.10.7
2002-01-15 Manuel M T Chakravarty <[email protected]>
* 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
* toplevel/Version.hs (versnum): 0.10.6
2002-01-10 Jens Petersen <[email protected]>
* c/CParser.hs (parseC): corrected "contained contained" in
proceeding comments.
* ../doc/c2hs/c2hs.sgml (Set Hooks): correct #get to #set
* ../doc/c2hs/Makefile (TOP): "../../.." to "../.."
2002-01-10 Manuel M T Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.10.5
2001-12-20 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (expandHook): fixed a sizeof bug pointed out by Jens
Petersen <[email protected]>
* toplevel/Version.hs (versnum): 0.10.4
2001-12-11 Manuel M. T. Chakravarty <[email protected]>
* toplevel/c2hs_config.c: now conforms to ISO C
* toplevel/Version.hs (versnum): 0.10.3
2001-11-14 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (setGet): debugged
2001-11-13 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (setGet): reading and writing of bitfields
(alignOffset): now handles alignment of bit fields
(extractCompType): debugging
2001-11-12 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (specType): added bitfield handling
(BitSize): introduced size specs for partially filled storage units
* toplevel/C2HSConfig.hs.in (bitfieldDirection): added
(bitfieldPadding): added
(bitfieldIntSigned): added
* toplevel/c2hs_config.c: runtime configuration query functions
* gen/CInfo.hs (CPrimType): extended by variants for bitfields
(size): now a function instead of an array
(alignment): now a function instead of an array
* gen/GenBind.hs (showExtType): simplified `showExtType' again;
the brace level idea doen't work for `DefinedET' anyway; so, let's
simplify the code
2001-11-08 Manuel M. T. Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.10.2
2001-10-17 Manuel M. T. Chakravarty <[email protected]>
* c/CParser.hs (parseCDecl): corrected the precise locatio where
an __attribute__ annotation may occur.
2001-10-16 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (evalConstCExpr): added `alignof'
* c/CNames.hs (naCExpr): added `alignof'
* c/CAST.hs: added `alignof'
* c/CParser.hs (parseCUnaryExpr): added `alignof' expressions
* c/CLexer.hs: added keyword `alignof'
* toplevel/Version.hs (versnum): 0.10.1
2001-10-08 Manuel M. T. Chakravarty <[email protected]>
* chs/CHS.hs: debugged
2001-10-07 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs: handling class hooks
* Makefile: improved cleaning targets
* chs/CHS.hs (parseClass): added class hooks
* chs/CHSLexer.hs: added tokens `class' and `=>'
* gen/GenBind.hs (isFunExtType): IO types are function types
* toplevel/Version.hs (versnum): 0.10.0 "Altocumulus Stratiformis
Perlucidus Undulatus"
2001-08-26 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (foreignImport): `libName' removed until the new
FFI conventions for libs are implemented in GHC
* c/CTrav.hs (dropPtrDeclr): fixed pointer to pointer case
* c/CPretty.hs: implemented pretty-printing for part of the C AST
2001-08-25 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (setGet): missed ";" in code generation
* c/CParser.hs (cidOrTN): after struct or union tag we may have a
normal idenifier or a type name; spotted by Simon Bowden
<[email protected]> and Michael Zinn <[email protected]>
2001-08-23 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (expandHook): adding parenthesis around the
g
TO GITHUB AND ARE DESCRIBED IN THE MAIN ChangeLog FILE.
2005-12-12 Manuel M T Chakravarty <[email protected]>
* c2hs/gen/GenBind.hs: When translating the target type of a
pointer hook into a Haskell type, don't take the pointer hook
alias map into account.
* c2hs.cabal: version 0.14.5
* c2hs/gen/GenBind.hs: Suppress code generation if requested
* c2hs/chs/CHS.hs: Added `nocode' to pointer hooks
* c2hs/chs/CHSLexer.hs: Added `nocode'
2005-12-05 Jelmer Vernooij <[email protected]>
* c2hs/c/CTrav.hs: only match in `checkForOneCUName' if there are
no indirections
2005-12-05 Jelmer Vernooij <[email protected]>
* c2hs/gen/GenBind.hs: support mapping struct and union names to haskell
types
* c2hs/c/CTrav.hs: added `checkForOneCUName'
Fri Nov 25 10:54:56 EST 2005 Jelmer Vernooij <[email protected]>
* add prettify functions for structs, enums and unions
2005-08-10 Manuel M T Chakravarty <[email protected]>
* c2hs/gen/GBMonad.hs: apply `upcaseFirstLetter' and
`downcaseFirstLetter' if specified
* c2hs/chs/CHS.hs: added `upcaseFirstLetter' and `downcaseFirstLetter'
2005-08-09 Manuel M T Chakravarty <[email protected]>
* c2hs/gen/CInfo.hs: exports `getPlatform'
2005-08-08 Manuel M T Chakravarty <[email protected]>
* c2hs/toplevel/Main.hs: Added --platform switch for cross compilation
* c2hs.cabal: 0.14.3
2005-08-08 Manuel M T Chakravarty <[email protected]>
* c2hs.cabal: 0.14.2
* Support asm construct (Duncon Coutts)
* Hierachical modules (Duncon Coutts)
2005-07-13 Duncan Coutts <[email protected]>
* Remove old C lexer & parser and replace them with new ones using
alex and happy
2005-07-14 Manuel M. T. Chakravarty <[email protected]>
* C2HS library as a single file added to the generated binding
code
2005-07-13 Manuel M. T. Chakravarty <[email protected]>
* Cabal-ised the build system
* c2hs.cabal (Version): 0.14.0
2005-05-18 Manuel M. T. Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.13.6
2005-03-14 Manuel M. T. Chakravarty <[email protected]>
* c/CParser.hs: Allow lists of GNU C attributes (patch contributed
by Duncan Coutts <[email protected]>)
* chs/CHSLexer.hs (instr): Allow 8-bit characters (Volker Wysk
<[email protected]> requested support for umlauts in strings)
* toplevel/Version.hs (versnum): 0.13.5
2004-10-18 Manuel M. T. Chakravarty <[email protected]>
* chs/CHS.hs (showCHSModule): Don't add extra '\n' after directive
during pretty printing
* chs/CHSLexer.hs (cpp): forgot to adapt lexing of #c to the new
situation where directives don't consume the following '\n'
2004-10-17 Manuel M. T. Chakravarty <[email protected]>
* c2hs.conf.in: Modernised package deps and options
* gen/GenBind.hs (expandHook): We use the shadow identifier for
generating the Haskell name.
* chs/CHSLexer.hs (identOrKW): Identifier may be put in single quotes
* toplevel/Version.hs (versnum): 0.13.4
2004-10-13 Manuel M. T. Chakravarty <[email protected]>
* chs/CHSLexer.hs (cpp): fixed lexing of directives such that they
don't consume the '\n' that ends them
* toplevel/Version.hs (versnum): 0.13.3
* toplevel/Main.hs (Flag): Added `--output-dir' option and removed
`--old-ffi'.
* gen/GenBind.hs (noDftMarshErr): better error message when
default marshallers are not available
(isIntegralCPrimType): handle C chars as integral types for marshalling
* 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
2004-10-09 Manuel M. T. Chakravarty <[email protected]>
* toplevel/Main.hs (process): store header file name in switch board
* state/Switches.hs: Store the name of the generated header file
(needed to generate complete foreign import declarations)
* gen/GenBind.hs (foreignImport): Add name of header file to
extent strings of generated foreign import declarations
* c/CAttrs.hs (applyPrefix): never create empty shadow identifiers
2004-10-08 Manuel M. T. Chakravarty <[email protected]>
* chs/CHS.hs (dumpCHS): Header doesn't contain the "-- **"
sequence anymore that Haddock dislikes.
* c/CParser.hs (parseCStructUnion): We allow structs and unions
with no declarations, as GNU C does
* toplevel/Version.hs (versnum): 0.13.2
2004-08-21 Manuel M. T. Chakravarty <[email protected]>
* tests/Makefile: use configured $HC (courtesy Don Stewart
<[email protected]>)
2004-06-11 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (pointerDef): Adapted to the standard interface
for foreign pointers
2004-06-10 Manuel M. T. Chakravarty <[email protected]>
* c/CParser.hs: Added parsing of function bodies
* c/CLexer.hs: Added tokens occuring in the statement syntax
2004-06-09 Manuel M. T. Chakravarty <[email protected]>
* c/CAST.hs: Added function bodies
* c/CPretty.hs: Added `auto' and `register' storage specifiers
* c/CLexer.hs: Added tokens for `auto' and `register' keywords
* toplevel/Version.hs (versnum): 0.13.1
2004-05-15 Manuel M. T. Chakravarty <[email protected]>
* c/CParser.hs (parseCHeader): Duncan Coutts
<[email protected]> identified a space (and
time) leak in the old typedef-name morphing setup; this has been
rewritten now
2004-05-14 Manuel M. T. Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.13.0 "Pressing Forward"
2003-10-20 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (foreignImport): brought generated foreign import
declarations in line with FFI Addendum
* toplevel/C2HSConfig.hs.in: removed legacy FFI support
* configure.in: removed legacy FFI support
* mk/config.mk.in: removed legacy FFI support
* lib/Makefile: Removed all deprecated code and support code for
old versions of the FFI
* toplevel/Version.hs (versnum): 0.12.1
2003-10-19 Manuel M T Chakravarty <[email protected]>
* c2hs.spec.in: Contributions by Jens Petersen
<[email protected]>: specify ghc version to build with;
don't redundantly provide c2hs; separate library out into
separate ghc version specific subpackage; put docs into separate
subpackage; disable empty debuginfo subpackage generation -
remove buildroot before installing; remove installed doc files,
since they're explicitly listed
* c/CLexer.hs (linedir): allow an arbitrary number of ints after
the filename in a #line directive; problem was first reported by Sean
Seefried <[email protected]>
* gen/GBMonad.hs (delayCode): Generate appropriate line numbers
for delayed code; problem reported by Sean Seefried
<[email protected]>
* chs/CHS.hs (showCHSModule): Never generate negative line numbers
* toplevel/Version.hs (versnum): 0.12.0 "Springtime"
2003-06-10 Manuel M T Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.11.5
2003-05-30 Jens Petersen <[email protected]>
* configure.in: Search for compiler named HC too.
2003-05-30 Jens Petersen <[email protected]>
* c2hs.spec.in (Version): Set directly.
(Release): Ditto.
(%prep): Quieten setup.
(%build): Use configure macro.
(%install): Use makeinstall macro.
(%post): Use _bindir.
(%files): Make root own files. Use _bindir, _libdir and _mandir.
2003-05-22 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (Ord): Need instance for `<=' for indirectly
defined `compare'; bug reported by Ian Lynagh <[email protected]>
* toplevel/Version.hs (versnum): 0.11.4
2003-04-16 Manuel M T Chakravarty <[email protected]>
* 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]>
* toplevel/Version.hs (versnum): 0.11.3
2003-03-04 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (evalConstCExpr): supporting enumerators in
constant expressions
* toplevel/Version.hs (versnum): 0.11.2
2003-02-13 Manuel M T Chakravarty <[email protected]>
* chs/CHS.hs: removed the "header" tag (we now support the CPP
#include directive)
* Configuration-related patch by Ian Lynagh <[email protected]> that
removes issues with GHC 5.05
2003-02-12 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (expandFrag): Expanding conditionals
* 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
* gen/GenHeader.hs: debugging
2003-02-05 Manuel M T Chakravarty <[email protected]>
* gen/GenHeader.hs: New module extracting CPP directives and
inline-C from a .chs file
* toplevel/Main.hs (process): Integrated generation of custom C header
* c/CParser.hs (parseCHeader): Header file may be empty
2003-02-01 Manuel M T Chakravarty <[email protected]>
* chs/CHS.hs (showCHSModule): emitting GHC line pragmas
(CHSFrag): added representations for cpp directives and inline-C
code, and adapted the functions processind the representations
* chs/CHSLexer.hs: Added support for pre-processor directives and
inline-C code
2003-01-31 Manuel M T Chakravarty <[email protected]>
* toplevel/Main.hs (process): Now reading the binding module
before the C header
2003-01-30 Manuel M T Chakravarty <[email protected]>
* c/CParser.hs: Allow more GNU attributes contributed by Axel
Simon <[email protected]>
2002-09-17 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* gen/GBMonad.hs (HsObject): working around a problem with
deriving Read in GHC 5.04.1
2002-09-16 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* Makefile (ghci): target to load all of c2hs into GHCi
2002-09-13 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* toplevel/c2hs_config.c: removed the `signed' modifier on
suggestion of Seth Kurtzberg <[email protected]> as it apparently
confuses the Solaris 8 C compiler
2002-09-07 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* c2hs.spec.in: add post install and uninstall scripts to register
and deregister the package with GHC
* configure.in: fixed REQUIRES_HASKELL for ghc
* toplevel/Version.hs (versnum): 0.10.17
2002-09-06 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* toplevel/C2HSConfig.hs.in (cppopts): Added "-x c" on suggestion
by Axel Simon
* Makefile (install): using --update-package instead of --add-package
* configure.in: Fixed some nhc98 related issues
* toplevel/Version.hs (versnum): 0.10.16
2002-07-12 Manuel M T Chakravarty <chak@AttitudeAdjuster>
* c2hs-config.in: added the system for which the package was
compiled to the output of the --version option
* c/CParser.hs (parseCStructUnion): Allow __extension__ in
structure declarations and added `inline'.
* c/CAST.hs: Added `inline'
* c/CLexer.hs: Added support for `inline' keyword
2002-07-06 Manuel M T Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.10.15
2002-05-16 Manuel M T Chakravarty <[email protected]>
* lib/C2HSMarsh.hs: added support for bit masks
* toplevel/Version.hs (versnum): 0.10.14
2002-05-10 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (setGet): corrected bug in bit fiddling
2002-05-02 Manuel M T Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.10.13
2002-04-16 Manuel M T Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.10.12
2002-03-20 Manuel M T Chakravarty <[email protected]>
* chs/CHSLexer.hs (haskell): Debug the handling of character literals
* toplevel/Version.hs (versnum): 0.10.11
2002-03-12 Manuel M T Chakravarty <[email protected]>
* c2hs.spec.in: we now require the Haskell compiler to be the one
for which the package was build
* Makefile: adapted to revised build system
* toplevel/Version.hs (versnum): 0.10.10
2002-03-06 Manuel M T Chakravarty <[email protected]>
* 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
2002-03-03 Manuel M T Chakravarty <[email protected]>
* configure.in: Package handling fix by Jens Petersen
* toplevel/Version.hs (versnum): 0.10.9
2002-02-25 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs: debugging
2002-02-24 Manuel M T Chakravarty <[email protected]>
* chs/CHS.hs (parseOptAs): `^' as synonym for previous identifier,
but with underscores rewritten to caps
* chs/CHSLexer.hs: added `CHSTokHat'
2002-02-23 Manuel M T Chakravarty <[email protected]>
* lib/C2HSMarsh.hs: added some more convenience functions
2002-02-21 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs: Completed processing of function hooks
2002-02-18 Manuel M T Chakravarty <[email protected]>
* chs/CHSLexer.hs: Added `CHSTokMinus'
* chs/CHS.hs: Revised the syntax of fun hooks
* chs/CHSLexer.hs: Added `CHSTokAmp' (representing `&')
* gen/GenBind.hs (foreignImport): factorised the code for call
hook generation to make those portions that are also useful for
fun hooks reusable
(expandHook): implemented fun hooks
* gen/GBMonad.hs: extracted monad-related code from `GenBind.hs'
* gen/GenBind.hs: split off the monad definition and operations
into `GBMonad.hs'
2002-02-17 Manuel M T Chakravarty <[email protected]>
* chs/CHSLexer.hs: introduced `hsverb' tokens
* chs/CHS.hs: `pure' instead of `fun' to indicate calls to pure
C functions (`fun' retained for backwards compatibility)
* chs/CHSLexer.hs: introduced the keyword `pure'
2002-02-13 Manuel M T Chakravarty <[email protected]>
* Makefile: adapted to using GHC package management
2002-02-11 Manuel M T Chakravarty <[email protected]>
* lib/Makefile (depend): increase portability
2002-02-06 Manuel M T Chakravarty <[email protected]>
* configure.in: probe for `grep'
2002-02-05 Manuel M T Chakravarty <[email protected]>
* aclocal.m4 (CTK_GHC_VERSION): no \+ in sed on Solaris
* toplevel/Version.hs (versnum): 0.10.7
2002-01-15 Manuel M T Chakravarty <[email protected]>
* 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
* toplevel/Version.hs (versnum): 0.10.6
2002-01-10 Jens Petersen <[email protected]>
* c/CParser.hs (parseC): corrected "contained contained" in
proceeding comments.
* ../doc/c2hs/c2hs.sgml (Set Hooks): correct #get to #set
* ../doc/c2hs/Makefile (TOP): "../../.." to "../.."
2002-01-10 Manuel M T Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.10.5
2001-12-20 Manuel M T Chakravarty <[email protected]>
* gen/GenBind.hs (expandHook): fixed a sizeof bug pointed out by Jens
Petersen <[email protected]>
* toplevel/Version.hs (versnum): 0.10.4
2001-12-11 Manuel M. T. Chakravarty <[email protected]>
* toplevel/c2hs_config.c: now conforms to ISO C
* toplevel/Version.hs (versnum): 0.10.3
2001-11-14 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (setGet): debugged
2001-11-13 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (setGet): reading and writing of bitfields
(alignOffset): now handles alignment of bit fields
(extractCompType): debugging
2001-11-12 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (specType): added bitfield handling
(BitSize): introduced size specs for partially filled storage units
* toplevel/C2HSConfig.hs.in (bitfieldDirection): added
(bitfieldPadding): added
(bitfieldIntSigned): added
* toplevel/c2hs_config.c: runtime configuration query functions
* gen/CInfo.hs (CPrimType): extended by variants for bitfields
(size): now a function instead of an array
(alignment): now a function instead of an array
* gen/GenBind.hs (showExtType): simplified `showExtType' again;
the brace level idea doen't work for `DefinedET' anyway; so, let's
simplify the code
2001-11-08 Manuel M. T. Chakravarty <[email protected]>
* toplevel/Version.hs (versnum): 0.10.2
2001-10-17 Manuel M. T. Chakravarty <[email protected]>
* c/CParser.hs (parseCDecl): corrected the precise locatio where
an __attribute__ annotation may occur.
2001-10-16 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (evalConstCExpr): added `alignof'
* c/CNames.hs (naCExpr): added `alignof'
* c/CAST.hs: added `alignof'
* c/CParser.hs (parseCUnaryExpr): added `alignof' expressions
* c/CLexer.hs: added keyword `alignof'
* toplevel/Version.hs (versnum): 0.10.1
2001-10-08 Manuel M. T. Chakravarty <[email protected]>
* chs/CHS.hs: debugged
2001-10-07 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs: handling class hooks
* Makefile: improved cleaning targets
* chs/CHS.hs (parseClass): added class hooks
* chs/CHSLexer.hs: added tokens `class' and `=>'
* gen/GenBind.hs (isFunExtType): IO types are function types
* toplevel/Version.hs (versnum): 0.10.0 "Altocumulus Stratiformis
Perlucidus Undulatus"
2001-08-26 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (foreignImport): `libName' removed until the new
FFI conventions for libs are implemented in GHC
* c/CTrav.hs (dropPtrDeclr): fixed pointer to pointer case
* c/CPretty.hs: implemented pretty-printing for part of the C AST
2001-08-25 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (setGet): missed ";" in code generation
* c/CParser.hs (cidOrTN): after struct or union tag we may have a
normal idenifier or a type name; spotted by Simon Bowden
<[email protected]> and Michael Zinn <[email protected]>
2001-08-23 Manuel M. T. Chakravarty <[email protected]>
* gen/GenBind.hs (expandHook): adding parenthesis around the
g