On Sat, May 08, 2010 at 01:54:21AM +0200, Limestraël wrote: > > Personally I think fail is a terrible wart, and should be shunned. > > So do I. > I can't understand its purpose since monads which can fail can be implemented > through MonadPlus.
It was introduced to implement pattern match failure in do-notation, in Section 3.14 of the Haskell Report: do {p <- e; stmts} = let ok p = do {stmts} ok _ = fail "..." in e >>= ok _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe