Move MonadIO to base

Twan van Laarhoven twanvl at
Sat Apr 10 11:35:53 EDT 2010


Some people have remarked that the MonadIO class would be better of in the base 
package instead of mtl/transformers. It can be used largely independently from 
the monad transformers, and it is useful without them.

This has been previously discussed [1,2], but as far as I know nothing ever came 
of it.

If MonadIO were in base, then the base library itself could also use it. For 
example the functions in System.IO could be lifted to work on any MonadIO monad. 
Whether that is a good idea is completely orthogonal to this discussion, however.

How hard would it be to make this change? For backwards compatibility mtl and 
transformers would need a check to see which version of base is used, or new 
versions of mtl/transformers should just not include MonadIO.



More information about the Libraries mailing list