architecture-dependent types

Simon Marlow simonmar at microsoft.com
Wed May 21 04:40:12 EDT 2003


 
> Should not Foreign.C.Types, Foreign.C.TypesISO and System.Posix.Types
> export their types opaquely?  That would make their interface and
> documentation architecture-independent.

The FFI doesn't explicitly specify whether these types should be
exported abstractly or not, but it does say in section 6.2:

"... all types exported by \code{CTypes} are
represented as type synonyms or \code{newtype}s of basic foreign types
..."

we should really decide one way or the other, since this ambiguity will
lead to non-portable differences between implementations of CTypes (and
hence Foreign.C.Types).  

Having the types be opaque sounds reasonable to me, and similarly for
System.Posix.Types.

Cheers,
	Simon




More information about the FFI mailing list