Simon Marlow <[EMAIL PROTECTED]> wrote,

> 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

I guess you meant to write `castForeignPtr'?

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

I was just about to propose basically the same - so, yes, I
vote for this proposal.  

Cheers,
Manuel

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

Reply via email to