Re: ANN: H98 FFI Addendum 1.0, Release Candidate 13

Ross Paterson <[email protected]>
Newsgroups gmane.comp.lang.haskell.ffi
Message-ID <[email protected]>
On Fri, Oct 31, 2003 at 06:45:41PM +1100, Manuel M T Chakravarty wrote:
> (1) The addition of a variant of foreign finalizers that
>     take an extra environment argument that facilitates the
>     emulation of closures in C.  This adds two functions to
>     `ForeignPtr'.

Regarding

	type FinalizerEnvPtr env a = FunPtr (Ptr env -> Ptr a -> IO ())

	newForeignPtrEnv :: FinalizerEnvPtr env a ->
		Ptr env -> Ptr a -> IO (ForeignPtr a)
	addForeignPtrFinalizerEnv :: FinalizerEnvPtr env a ->
		Ptr env -> ForeignPtr a -> IO ()

Doesn't this mean that the env must be either static storage (gaining
nothing) or dynamic storage that cannot be reclaimed (which brings us
back to where we started)?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.