ANN: H98 FFI Addendum 1.0, Release Candidate 10

Simon Marlow simonmar at microsoft.com
Wed May 28 04:49:13 EDT 2003


 
> Manuel M T Chakravarty <chak at cse.unsw.edu.au> writes:
> 
> > -=- Changes since RC 9
> > 
> > * 6.2:   All the types in CTypes must be newtypes that are exported
> >          abstractly. 
> 
> This change makes things highly inconvenient in nhc98.  A newtype
> can only be passed across the FFI in nhc98 if we have enough
> information to determine the original type that is being renamed.
> If Foreign.C.Types exports them abstractly, then currently we do not
> have that information, and so these types cannot be used at all!
> 
> I am not suggesting that the newtype constructors should necessarily
> be part of the API seen by the user, but the problem comes down to a
> known deficiency in nhc98's interface file conventions.  

How about exporting them non-abstractly for nhc98 only, and adding a
comment to explain why the workaround is necessary?

Cheers,
	Simon



More information about the FFI mailing list