Dear FFI folks,

I'd like to summarise the current proposals on the table and see if we
can get a consensus.

Proposal #1: replace ForeignObj with (ForeignPtr a).

        * new module ForeignPtr, with the following interface:

                module ForeignPtr
             ( ForeignPtr,            -- abstract, instance of: Eq
             , newForeignPtr          -- :: Ptr a -> IO () -> IO
(ForeignPtr a)
             , addForeignPtrFinalizer -- :: ForeignPtr a -> IO () -> IO
()
             , withForeignPtr         -- :: ForeignPtr a -> (Ptr a -> IO
b) -> IO b
                 , foreignPtrToPtr        -- :: ForeignPtr a -> Ptr a
             , touchForeignPtr        -- :: ForeignPtr a -> IO ()
                 , caseForeignPtr         -- :: ForeignPtr a ->
ForeignPtr b
             )

        * deprecate all of ForeignObj
        * replace references to ForeignObj in the FFI spec with
ForeignPtr.
        * export module ForeignPtr from Foreign.
        * GHC only: deprecate Weak.addForeignFinalizer

Cheers,
        Simon

_______________________________________________
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi

Reply via email to