Typing f.e.d.
Simon Marlow
simonmar at microsoft.com
Mon Feb 12 05:40:02 EST 2001
> As usual the FFI "looks through" newtypes. But now that we have
> FunPtr, the following typing makes much more sense:
>
> 'foreign' 'export' [callconv] 'dynamic' varid :: prim_type
> -> IO (FunPtr prim_type)
>
> where both prim_types have to be the *same*. We should probably allow
> the old Addr-typing as well for some time to facilitate the
> transition,
> but not the Ptr-typing (bleeding edge people will know what to do :-).
> The corresponding changes to GHC look easy, so I'd like to commit this
> if there are no objections.
Sounds reasonable to me.
Simon
More information about the FFI
mailing list