Show, Eq not necessary for Num [Was: Revamping the numeric classes]

Marcin 'Qrczak' Kowalczyk
10 Feb 2001 07:17:57 GMT

Sat, 10 Feb 2001 14:09:59 +1300, Brian Boutel <> pisze:

> Can you demonstrate a revised hierarchy without Eq? What would happen to
> Ord, and the numeric classes that require Eq because they need signum? 

signum doesn't require Eq. You can use signum without having Eq, and
you can sometimes define signum without having Eq (e.g. on functions).
Sometimes you do require (==) to define signum, but it has nothing to
do with superclasses.

 __("<  Marcin Kowalczyk *
  ^^                      SYGNATURA ZASTĘPCZA