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

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
10 Feb 2001 07:17:57 GMT


Sat, 10 Feb 2001 14:09:59 +1300, Brian Boutel <brian@boutel.co.nz> 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 * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK