MonadIO in mtl and transformers

Michael Snoyman michael at
Mon Dec 21 00:03:09 EST 2009

On Mon, Dec 21, 2009 at 4:10 AM, Antoine Latter <aslatter at> wrote:

> 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:
> 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]
> _______________________________________________
> Libraries mailing list
> Libraries at

+1, this is a great idea. I've had to purposely remove useful functions from
safe-failure package due to this issue as well. I think we all agree that
the best choice is to merge mtl and transformers, but since that discussion
seems to have come to a stand-still, splitting off MonadIO and MonadTrans
seems like a good second best.

Of course, I won't complain if someone just fixes the mtl/transformers mess
itself ;).

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Libraries mailing list