[Haskell] Re: threading mutable state through callbacks

Jules Bean jules at jellybean.co.uk
Fri Oct 8 01:51:21 EDT 2004


[snip oleg's paper which looks interesting, and which I will read]

On 8 Oct 2004, at 02:44, oleg at pobox.com wrote:
> The example is writing JNI functions in Haskell. Incidentally, the
> example illustrates passing of the implicit state (JNIEnv pointer)
> _around_ the exception handler. The problem is that the function
> 'handle' has the type
> 	handle :: (Exception -> IO a) -> IO a -> IO a
> rather than
> 	handle :: (Exception -> MonadIO a) -> MonadIO a -> MonadIO a
>

Right.  In principle, is it even possible to design haskell FFIs in 
terms of MonadIO instead of IO? This would be very nice if it was!

Jules



More information about the Haskell mailing list