check for exhaustive patterns is broken
Feliks Kluzniak
feliks at crt.se
Mon Mar 4 11:33:47 EST 2002
> A somewhat prettier solution would maybe be to use Ord.compare:
> case (compare k k') of LT -> ... ; GT -> ... ; EQ -> ...
Thanks, I did consider this one, but it did not seem too pretty to me. All in
the eye of the beholder, of course.
> This might even be faster if comparison is expensive.
Hm, you might have a point. I tend to more or less forget about lower-level
speed issues when programming in Haskell, which is quite a relief (!) and still
leads to good result.
-- F. K.
More information about the Glasgow-haskell-bugs
mailing list