ANN: H98 FFI Addendum 1.0, Release Candidate 6

Manuel M T Chakravarty chak at
Thu Sep 12 02:35:51 EDT 2002

Please review RC 6 available at

A change log is appended.  This version features a rather
large number of changes over the last version, which is
making me a bit uneasy, as I hoped that the spec would
converge soon.  But many of these changes have been prompted
by Alastair and Malcolm bringing their systems in line,
which is probably the most effective way of debugging the



* Author list: changed Alastair Reid's institution
* 1.4:   Clarified the wording
* 4.1:   Explicitly stated that access to pre-processor symbols is not
         provided by the FFI
* 4.1.1: Removed [lib] from impent syntax and discussion
* 4.1.3: Added parentheses round FunPtr ft to make it easier to 
         understand a tolerably complex type.
* 4.1.4: Removed all mention of library objects; clarified that header files
         do not impact the semantics of foreign calls, but may be required
         for correct code generation by some systems
* 5.2:   Clarified that all operations in Bits are member functions of the
         type class.  Reverse the meaning of the sign of the second argument
         for `rotate' and `shift' (this makes it the same as GHC used all
         the time).  `bitSize' on `Integer' etc is now undefined.
* 5.5:   Finalisers must be external functions to facilitate the
         implementation on Haskell systems that do not support pre-emptive
         Added mallocForeignPtr and mallocForeignPtrBytes.
* 6:     Specified that HsBool==int in table2
         Relabelled column 1 in table 3 (C symbol -> CPP symbol)
         Replaced 0 and 1 with HS_BOOL_FALSE/TRUE
* 6.1:   Clarified that nullPtr (nullFunPtr) coincides with (HsPtr) NULL and
         (HsFunPtr) NULL, respectively.
         Allowing multiple calls to hs_init() and clarified the constraints
         on the relative timing between hs_set_argv() and
         Added hs_perform_gc().

More information about the FFI mailing list