Should exhaustiveness testing be on by default?
phercek at gmail.com
Mon May 18 05:45:38 EDT 2009
Neil Mitchell wrote:
> I'm not a particular fan of exhaustiveness checking. It just
> encourages people to write:
> foo (Just 1) [x:xs] = important case
> foo _ _ = error "doh!"
> So now when the program crashes, instead of getting a precise and
> guaranteed correct error message, I get "doh!" - not particularly
> helpful for debugging
Is there some compile option to automatically annotate error call with
code location (so that one dos not need to mention it in the string
More information about the Glasgow-haskell-users