ross at soi.city.ac.uk
Thu Nov 7 12:05:17 EST 2002
On Thu, Nov 07, 2002 at 04:53:04PM +0000, Alastair Reid wrote:
> >> On first glance, this looks cool. What instances do you envision
> >> (assuming I persuaded you that StablePtr and FunPtr should not be)?
> > How about Int (for file descriptors, etc)?
> Ah, got you.
> How about making ForeignPtr slightly more polymorphic so that instead of
> working only on 'Ptr a' it works on 'a'.
That was Ashley's original proposal, but SimonM responded in
that the extra boxing was unsafe in GHC. Hence the Finalizable class
for boxed primitive objects, similar to the way UArray's are presented
without exposing GHC's unboxed types.
More information about the FFI