new ForeignPtr without finalizers

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Mon Jun 9 04:55:49 EDT 2003


Ashley Yakeley <ashley at semantic.org> writes:

> OK, I just upgraded to GHC 6.0. How do I create a new ForeignPtr that 
> doesn't have any finalizers?
> 
>   newSimpleForeignPtr :: Ptr a -> IO (ForeignPtr a)
>   newSimpleForeignPtr ptr = ??

Why would you want to?

A ForeignPtr without any finalizers is semantically just a Ptr,
plain and simple.

Regards,
    Malcolm



More information about the FFI mailing list