CCallable/CReturnable classes (was Re: FFI Report, CVS Id 1.5)

Alastair David Reid reid at
Tue Jun 12 14:10:36 EDT 2001

Sven Panne <Sven_Panne at> writes:

> I think it boils down to the following: For every calling convention
> there is a fixed set of primitive types which the Haskell system
> must know about, e.g. CInt, CFloat, Ptr a, ... for ccall/stdcall.

I haven't been following the Storable stuff very closely but this mail
made me think about the CCallable/CReturnable stuff currently in GHC
(for which SimonPJ and I share the blame).

Is CCallable/CReturnable a useful part of the new multi-lingual ffi
story (either in the ffi spec or in GHC's implementation of the ffi

I think the answer is no: being able to pass a given type to C
doesn't necessarily the same as being able to pass that same type to
Java or C#.  They could be supplemented by new classes with names like
{Java,C_Sharp,Python,...}{Callable,Returnable} but that would be ugly.

Alastair Reid        reid at

More information about the FFI mailing list