On Tue, Feb 10, 2015 at 8:18 AM, Mike Meyer <mwm@mired.org> wrote:
ghc can't decide whether or not the tests in the guards are complete or not.
Expanding on this: that < and >= cover all cases is something that is convention for Ord instances, not something absolutely guaranteed to be true. (In fact, they *don't* cover all cases for IEEE floating point math, if either value is NaN. An SQL numeric value type would also not cover all cases because of the behavior of NULL. In both those cases, *both* conditions would return False.) The fact that you specified a type for which it does happen to be true doesn't really matter, because there's no way to convey a proof to the compiler that it's true for some types but not others. (Some argue that this and some other things are signs that the Ord typeclass is poorly designed; that is a fairly complex discussion.)
A compiler for something like C would assume that it covers all types (and then behave weirdly in the above mentioned cases. Somewhat infamously, there was a longstanding bug in a standard C library function (qsort()) for decades because of this); Haskell compilers are a bit more pedantic and warn you that Ord provides no proof that those two conditions cover all cases.