check for exhaustive patterns is broken

Lauri Alanko la at iki.fi
Sun Mar 3 11:31:00 EST 2002


On Mon, Feb 11, 2002 at 05:37:32PM +0100, Feliks Kluzniak wrote:
> > I would replace the last guard with 'otherwise'.
> 
> Strangely enough, this particular solution never occurred to me. Not
> as pretty as the original, but thanks!

A somewhat prettier solution would maybe be to use Ord.compare:

case (compare k k') of LT -> ... ; GT -> ... ; EQ -> ...

This might even be faster if comparison is expensive.


Lauri Alanko
la at iki.fi




More information about the Glasgow-haskell-bugs mailing list