[Haskell-cafe] Do we need Monad fail (or MonadFail)?

John Smith voldermort at hotmail.com
Tue Dec 21 10:49:48 CET 2010

Monads seem to use fail in one of three ways:

-Regular monads leave it at the default definition of error
-MonadPlus sometimes redefines it to mzero
-IO redefines it to failIO

Are there any other definitions of fail? If not, does the special case of IO really need a class-level definition, or 
could there be another way of dealing with failed pattern matches?

More information about the Haskell-Cafe mailing list