[Haskell-cafe] Why were unfailable patterns removed and "fail" added to Monad?

Scott Turner 2haskell at pkturner.org
Thu Jan 26 11:16:27 CET 2012


On 2012-01-24 05:32, Michael Snoyman wrote:
> On Fri, Jan 20, 2012 at 6:52 AM, Michael Snoyman<michael at snoyman.com>  wrote:
>> provide an extra warning flag (turned on by -Wall) that will
 >> warn when you match on a failable pattern.

> I've filed a feature request for this warning:
> http://hackage.haskell.org/trac/ghc/ticket/5813

Thanks!  I wish the compiler could tell the difference between monads 
that handle failure nicely (e.g. List) and those that throw a runtime 
error (e.g. IO).

Something's wrong -- I'm feeling nostalgic for MonadZero.



More information about the Haskell-Cafe mailing list