Proposed change to ForeignPtr
simonmar at microsoft.com
Wed Sep 4 12:31:00 EDT 2002
> 1) Add these functions:
> :: Ptr a -> FunPtr (Ptr a -> IO ()) -> IO (ForeignPtr a)
> :: ForeignPtr a -> FunPtr (Ptr a -> IO ()) -> IO ()
> It is implementation defined whether the free functions are allowed
> to call Haskell functions.
> 2) Remove newForeignPtr and addForeignPtrFinalizer
> [GHC can go ahead and list them as non-standard extensions]
> There's a minor issue about whether the old function names should be
> reused (leaving GHC to come up with its own names) or not. I have
> ceased to care either way.
I have a slight preference for re-using the old names, at least for
newForeignPtr. The reason is that it follows the naming conventions in
More information about the FFI