Move MonadIO to base
ml at isaac.cedarswampstudios.org
Mon Apr 12 21:53:16 EDT 2010
On 04/10/10 11:35, Twan van Laarhoven wrote:
> 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.
I think it is relevant to the discussion to consider whether the MonadIO
class is a good idea in general -- if it's not a broad enough use, then
maybe we shouldn't implicitly sanction it by putting it in 'base'. Is
it mainly to make monad-transformer code more readable* by requiring
fewer explicit lifts? Are there other reasons? (Pointing to example
code that uses MonadIO would be a good answer.)
*i've grown increasingly doubtful of the idea that more classes /
less-explicit code reliably makes things more readable.
(I see nothing wrong with splitting MonadIO out into a new package
(besides that proliferation of packages is a bit annoying)...
More information about the Libraries