[Haskell] threading mutable state through callbacks

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Wed Oct 13 19:25:18 EDT 2004

Jules Bean <jules at jellybean.co.uk> writes:

> Unless its possible to arrange haskell FFI bindings to have types in
> MonadIO rather than IO...

MonadIO is a class, not a type. Anyway, it's conceptually impossible
to wrap a computation of an arbitrary monad in the MonadIO class into
IO. It's not a technical difficulty, it just does not make sense.
It's similar to asking for a non-trivial function of type
Monad m => m a -> a. Unless you mean something else.

   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/

More information about the Haskell mailing list