fail, MonadFail, or MonadPlus? (was Re: broken Monad Either instance?)

Tyson Whitehead twhitehead at
Fri Dec 9 17:01:44 CET 2011

On December 8, 2011 20:15:57 Iavor Diatchki wrote:
> this is the way things used to be in Haskell 1.4 (if you are curious
> take a look at page 21 of
>  I am not
> exactly sure why the change with the "fail" method happened but I
> think it had something to do with concerns that depending on the
> pattern your program might get a different constraint (e.g. Monad vs.
> MonadPlus).   To me this seems perfectly reasonable I don't know why
> it was perceived as a problem.

I would think the only other option (presumably what we do now?) would be to 
define fail as error for monads where it doesn't make sense.

This, however, strikes me as something not very much in the spirit of haskell 
as it seems to be pushing compile time issues to runtime.

Cheers!  -Tyson

More information about the Libraries mailing list