#4159: move Monad and MonadFix instances for Either from mtl to
base
Henning Thielemann
lemming at henning-thielemann.de
Wed Jun 30 11:44:42 EDT 2010
On Wed, 30 Jun 2010, Tyson Whitehead wrote:
> Perhaps it could be pushed it into it's own type class, which would then
> required by the do notation? Exactly like mdo required MonadFix. I
> understand there was one called MonadZero for this at some time?
I assume that there is no need to change the compiler, just the library,
or even just the imports, since GHC will simply insert 'fail' where
necessary and this automatically introduces the type class constraints
that 'fail' has. If a custom 'fail' from a new MonadError class is in
scope, then MonadError will be required for the whole expression that a
'do' block represents.
More information about the Libraries
mailing list