[Haskell-cafe] Do we need Monad fail (or MonadFail)?
Lauri Alanko
la at iki.fi
Tue Dec 21 16:45:57 CET 2010
On Tue, Dec 21, 2010 at 08:31:08AM -0700, Jonathan Geddes wrote:
> I'd love for the compiler to give an error (or maybe just a warning)
> in the case that I have a pattern match in a monad that just blows up
> (throws an exception) on a pattern match failure.
You will be interested to know that everything you ask for already was
in Haskell ages ago:
http://www.cs.auckland.ac.nz/references/haskell/haskell-report-1.4-html/exps.html#do-expressions
They decided to get rid of it in Haskell 98, for reasons that someone
else can probably explain.
Lauri
More information about the Haskell-Cafe
mailing list