> Why is the class heirarchy set up such that 2^(-1) gives and error in
> hugs and ghc?
It has nothing to do with ghc or Hugs, it's the way Haskell is
defined.  If (^) was defined the way you suggest then it would
be impossible to raise a number from the Integral class to
an exponent since there is no (/) on Integral.  Maybe you
should use (^^) instead, it is defined the way you suggest.
Or perhaps (**) which works on almost any number type.

Maybe you should have a look in the Haskell Prelude to see
what's available?

> So I gues my real question should be:  Why dose Num not require Ord?
Because some numbers are not ordered, e.g. complex numbers.

        -- Lennart


Reply via email to