Should exhaustiveness testing be on by default?

Norman Ramsey nr at
Wed May 20 17:41:15 EDT 2009

 > >  > ... exhaustive pattern checking might well help out a lot of
 > >  > people coming from untyped backgrounds...
 > >
 > > Or even people from typed backgrounds.  I worship at the altar of
 > > exhaustiveness checking.
 > Do you really want exhaustiveness, or is what you actually want safety?

I want both.  Exhaustiveness checking now and forever, because it's a
modular property.  Safety when somebody gets around to implementing
whole-program analysis in the compiler I use, when I feel like waiting
around for a whole-program analysis to complete, and when I'm not
making local modifications to somebody else's enormous, unsafe Haskell

Needless to say, safety analysis should identify 'assert False' and
confirm at compile time that there are no assertion failures.


More information about the Glasgow-haskell-users mailing list