On Fri, Jan 20 2012 at 06:22 +0100, Evan Laforge wrote:

> On Thu, Jan 19, 2012 at 8:53 PM, Edward Z. Yang <[email protected]> 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 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
> do...
>

Perhaps a generalization of this would be to warn only if fail was
inherited by the original Monad typeclass, where it seems obvious that
fail takes the role of a ``work-around''. When fail is overwritten one
could perhaps assume that calling it is the intended behavior for
pattern match failures.

Lu

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to