MonadIO in mtl and transformers

Antoine Latter aslatter at gmail.com
Sun Dec 20 21:10:52 EST 2009


Folks,

Would there be support for splitting off the MonadIO class from the
mtl, and simple having Control.Monad.Trans re-export it?
My proposed packaging of the functionality is here:
http://community.haskell.org/~aslatter/code/monad-io


Here's my problem which prompted this:

I'm converting a library of mine over to the failure[1] package for
returning errors, and the type on a lot of my functions is as follows:

(MonadFailure MyFailureType m, MonadIO m) => Alpha -> Beta -> m Gamma

The MonadFailure constraint is defined separate from its many
instances, which would give the consumers of my library the choice
between using the mtl or the transformers[2] library.

Except that I also need a MonadIO constraint, for which I must pick
from which package I choose it.

Antoine

[1] http://hackage.haskell.org/package/failure


More information about the Libraries mailing list