-
Notifications
You must be signed in to change notification settings - Fork 52
Release Notes
Important changes (especially those affecting the semantics of the tool) are documented in the following.
- Test fixes to work with GHC 7.10.1
- Marshalling for C bool values #128
-
Revert bad fix for bool handling #127
-
Wrapper generation for bare structure arguments #117 plus custom setup script to support Cabal builds on versions of Cabal without explicit support for extra C sources generated by preprocessors (@RyanGIScott)
-
Arrays in structuress bug #123
-
Test fixes for Windows
-
Test fixes for 32-bit platforms (Jürgen Keck: @j-keck)
-
Multi-character constants for OS X #15
-
Better support for binding to variadic functions #102
-
First (not very good) implementation of support for variadic functions #102
-
Default marshallers for Char types #98
-
Parametrized pointer types in pointer hooks #36
-
Special "+" parameters for efficient foreign pointer marshalling #46
-
Add default marshallers for C types #83
-
Fix treatment of arrays within structs #115
-
Add ability to omit given enum values #116
-
Regression suite tidy-ups
-
Get CUDA Travis tests working again (hopefully...)
-
Modify approach for defining C2HS_MIN_VERSION macro to work with NVIDIA's nvcc CUDA compiler #111
-
Fix problem with parser for {#enum ...#} renamings #113
-
Add {#const ...#} hook for accessing #defined constants #65
-
Persist enumeration definitions across modules #103
-
Add nocode keyword for enumeration definitions #70
-
Bump version for language-c to fix OS X problems (#82, #85) (thanks to Anthony Cowley and Benedikt Huber for help with this)
-
Add finalizer support to foreign pointer definitions #73
-
Comment parsing cleanups (Sivert Berg: @sivertb)
-
Add C2HS_MIN_VERSION(major,minor,revision) preprocessor macro
-
Suppress regression suite build (and associated dependency installation) for non-Travis cases
-
Fix Cabal file to include previously missing tests
-
Numerous improvements to Enum handling #78 (Philipp Balzarek: @Philonous)
-
Handle Haddock comments within C2HS hook definitions #62 (@tangboyun)
-
Better error messages for missing files (Zejun Wu: @watashi)
-
Write CHS dump files to output directory (Zejun Wu: @watashi)
-
Handle C calling conventions within function pointer declarations #88 (Michael Steele: @mikesteele81)
-
Fix FreeBSD libssh2 problem #87 (Cindy Wang: @CindyLinz)
-
Better error messages for hook syntax errors (Ryan Scott: @RyanGIScott)
-
Fix test suite to use C2HS from dist directory #81
-
Allow free intermixing of command line options and input files #86
-
Treat CLang "block" syntax and other "non-GNU" issues differently: always undefine BLOCKS CPP symbol to avoid problems with blocks; add nonGNU directive to trigger undefine of GNU-specific pre-processor symbols #77
-
Handle indented CPP directives correctly #80
-
Handle #sizeof and #alignof on non-typedef's structures #95
-
Fix #get and #set hooks to access newtyped pointers #96
-
Fix round-trip problem for interface files caused by changes in language-c #87
-
Treat "with" specially so that it can appear both as a marshaller identifier in an input parameter definition and as a keyword in enum definitions #93
-
Temporarily disable CUDA regression suite examples (CUDA install problems on Travis)
-
Fix more regressions from 0.16.6 (affected packages included gnome-keyring, hsndfile and cuda)
-
Add regression suite tests to reduce chances of future regressions
-
Fix regressions from 0.16.6 (caused by fix for issue #45)
-
Version number bump (should have been done in the last release)
-
Trivial integer casts in enum defines supporting typedefs [Anton Dessiatov]
-
Allow forward definition of enums (issue #23)
-
Binding of C enums with aliases (issue #38)
-
Default marshallers for enum and pointer hooks (issue #31)
-
Remove dependencies on C2HS module from marshalling code (issue #37)
-
Problem with MacOS blocks notation (issue #29)
-
Include directive on first line produces invalid Haskell (issue #16)
-
Add command-line switch to suppress GNU preprocessor symbols (issue #60)
-
Fix size and alignment computation of bitfields [Facundo Dominguez]
-
Allow prefixes to be replaced, not just removed (issue #19)
-
Allow reference to structure tags from accessors (issue #54) For access paths for {#get#}, {#set#}, etc., one can now specify that structure tags are to be searched preferentially by saying, for example, {#get struct _point->y#} instead of {#get _point->y#}. The latter case will search for typedef names first and only then structure tags.
-
Support for anonymous enums (issue #43)
-
with... unwrapper type declarations for pointer hooks (issue #44)
-
{#fun...#} indentation for use in where clauses (issue #45)
-
incorrect method names from terminal class in superclass instances (issue #21)
-
"offsetof" directive (issue #22)
-
--include flag cannot handle windows paths (issue #30) Now uses System.FilePath splitSearchPath function, which should be platform-agnostic.
-
Void functions produce "defined but not used" warning (issue #47) Handle fun hooks with a void result using ">>" instead of ">>=".
-
Add CPP undefine flags for Gnu compiler defines (issue #51)
-
Cabal test suite
- Migration to GitHub; documentation changes.
- Supports marshaller arguments and alignof hooks among some other changes.
- Works with GHC 6.12.
-
Use the new package Language.C that Benedikt Huber recently extracted from C->Haskell's code base.
-
Support for OS X
-
Implement enum hooks
-
Various bugs fixes
-
New C parser that can parse all of C99 and GNU C
-
Make c2hs integrate better with Cabal (1.2 and later)
-
Adapted to GHC 6.8.
-
Now requires Cabal 1.2.
-
Lots and lots of old code removal
-
Several bug fixes and improvements from Udo Stenzel:
- allowing variadic functions in structures
- allowing call and fun hooks for FunPtrs in C structs
- embedded arrays size calculated correctly
-
Added
nocode
directive to pointer hooks -
Can use structs properly in pointer hooks now (contributed by Jelmer Vernooij)
-
upcaseFirstLetter
anddowncaseFirstLetter
-
Cross-compiling with
--platform
flag -
Gcc's
asm
construct is supported (contributed by Duncan Coutts) -
Hierarchical modules syntax in
import
hooks supported -
No separately installed marshaling library anymore; as a result binary
c2hs
packages and installations are now independent of the targeted Haskell system -
New lexer and parser generated with Alex and Happy (contributed by Duncan Coutts)
-
Cabal build system
-
Works with GHC 6.4 and Cabal packages
-
Strings may contain 8-bit characters (e.g., umlauts).
-
Identifier may optionally be put in single quotes. (This is useful if they would otherwise collide with a
c2hs
keyword.) -
Some smaller bug fixes
-
C chars are treated as integral types for marshalling purposes.
-
If there is no explicit output file specified, the generated header file is put in the same directory as the binding file; otherwise, it goes in the directory where the output file is put. Moreover, the
--output-dir
option enables the specification of directory where all generated files are to be put. -
Foreign import declarations include the name of the header file generated by
c2hs
(ie, it needs neither be passed to the Haskell compiler at the command line nor in an OPTIONS pragma). -
We allow structs and unions with no declarations.
-
Headers including function bodies are now parsed correctly.
-
Duncan Coutts identified a space leak in the parser whose removal improved performance significantly.
-
Removed support for deprecated
C2HS
interface and for old versions of the FFI libraries -
Improved line pragma generation
-
Works with GHC 6.3
-
Builds on Mac OS X thanks to a patch by Sean Seefried
-
Bug fixes
-
Constant expression can now contain enumerators
-
header
label removed fromcontext
hooks -
WARNING This version of
c2hs
may overwrite C header files in the current directory. More precisely, if a binding module with the nameFoo.chs
is processed, a header file with the nameFoo.h
is generated and will overwrite any file of the same name in the current directory or the directory specified via the-o
option. -
Added support for CPP directives, including special treatment of conditions, and for inline C code; specification of a header file as an argument to
c2hs
is now option. -
GHC line pragmas are emitted into generated Haskell code
-
Swap the order of reading the binding module and the C header (i.e., we now read the binding module first)
-
Worked around a bug in GHC 5.04.1
-
Solaris-related fix
-
Marshalling support for bit masks represented as enumeration types
-
Added
fun
hooks -
as
aliases can use^
convert the orignal identifier withunderscore2case
-
In call hooks, the attributes
fun
was replaced bypure
(fun
is will still be recognised for a while to ensure backwards compatibility, but it's use is deprecated) -
GHC's package system is now supported
-
If two import hooks add a type mapping for a pointer hook with the same name, the textual later one dominates.
-
Bug fixes
-
Support for bitfields (they are correctly handled when computing struct offsets and they can be accessed using
set
andget
hooks) -
Some more support for GNU C extensions (
alignof
and better support__attribute__
) -
Added
class
hooks
-
Bug fixes
-
Library names in
foreign import
s have been removed until the convention of the new FFI is implemented (they are currently silently omitted) -
Added
sizeof
hooks; sizeof of type names is now also supported in constant expressions -
Local prefix for
enum
hooks; courtesy of Armin Sander -
Added
import
hooks -
The documentation includes a description of binding hooks
-
Added
pointer
hooks, which were derived from code for a similar feature by Axel Simon; this includes proper treatment of parametrised pointers -
Integrated
deriving
option forenum
hooks, which was contributed by Axel Simon -
Adapted to GHC 5.0
-
Adaptation layer for legacy
StablePtr
interface -
Forgot to export
FunPtr
and associated functions fromC2HS
-
Forgot to export some names in
C2HSDeprecated
-
Added support for gcc's
__builtin_va_list
-
Library adapted to New FFI; the old interface can still be used by importing
C2HSDeprecated
-
FFI Library specification added to the documentation
-
CygWin support; based on suggestions by Anibal Maffioletti Rodrigues de DEUS
[email protected]
-
IntConv
instances forInt8
,Word8
, andChar
-
Debugged the stripping of prefixes from enumerators; prefixes are now generally stripped, independent of whether they can be stripped from all enumerators of a given enumeration type
-
Comma now correctly required after
underscoreToCase
. WARNING This breaks source compatibility with previous versions.
-
Provisional support for GHC 4.08
-
Corrected constant folding
- Ignores any occurrence of
#pragma
.
- Bug fixes and support for
long long
.
-
This is mainly a bug fix release. In particular, the space behaviour of
c2hs
has been significantly improved. -
IMPORTANT NOTE From this release on, library names in
lib
tags incontext
hooks should not contain a suffix (i.e., omit.so
etc).