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

Evan Laforge qdunkan at gmail.com
Fri Jan 20 06:22:40 CET 2012

On Thu, Jan 19, 2012 at 8:53 PM, Edward Z. Yang <ezyang at mit.edu> wrote:
> It's not obvious that this should be turned on by -Wall, since
> you would also trigger errors on uses like:
>    [ x | Just x <- xs ]

I was going to say, perhaps refutable matches were considered
important was because back then list and monad comprehensions were
still the same.  List-comps is the only place I use refutable matches,
but they're extremely handy.  I would have suggested that listcomp
match failures yield [] but monad ones be errors, but now that list
comps and monads are back together again maybe that's not so easy to

More information about the Haskell-Cafe mailing list