ANN: H98 FFI Addendum 1.0, Release Candidate 9

Manuel M T Chakravarty chak at cse.unsw.edu.au
Thu May 22 05:05:38 EDT 2003


Ross Paterson <ross at soi.city.ac.uk> wrote,

> Some typos:
[..]

Thanks for reading the document so carefully!

> and a query: why are there conversions between StablePtr a and (Fun)Ptr a,

In tool-generated bindings, it is sometimes more convenient
to cast to a Ptr and pass the Ptr.

> and HsStablePtr constrained to (void *)?

This is a kludge.  Essentially, we would like an abstract
type and (void *) is the closest you get in C (and what is
typically used in C APIs for the same purpose).  It is
important to be concrete about the type to fix the storage
requirements.

Cheers,
Manuel



More information about the FFI mailing list