Lennart about the power operator (I don't remember who
posed the question...):
> 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 loo
> 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
Why is the class heirarchy set up such that 2^(-1) gives and error in
hugs and ghc? I don't know if there is some deep issue that requires there
to be some exponential function with this property but this seems like a
pretty serious bug. The obvios solution:
expon x y = if y<0 then