Re: -Wall and the fail method

2015-05-22 Thread Edward Kmett
It probably doesn't belong in -Wall, as it is a fairly common idiom to use fail intentionally this way, but it could pretty easily be added to the 'do' and list/monad comprehension desugaring to issue a separate warning that we don't turn on by default. Making it possible to see where you use

-Wall and the fail method

2015-05-22 Thread Nikita Karetnikov
Can -Wall be extended to report pattern match failures in do expressions, like it does for case expressions? Prelude :set -Wall Prelude let f = do Just x - return Nothing; return x Prelude let g = case Nothing of Just x - x interactive:9:9: Warning: Pattern match(es) are non-exhaustive