interface Pow a b where
(^) : a -> b -> a
a ^ b raises a to the power b (infixr 8, binds tighter than *). A single operator dispatched on the exponent type, unifying Haskell's ^/^^/**:
a ^ Nat— repeated multiplication, for anyMultiplicative a;a ^ Int— integer power, negative exponents viarecip
(DivisionRing a);
Double ^ Double— real power.
There is deliberately no Int ^ Int: 3 ^ (-2) has no Int result, so Int (not a DivisionRing) only admits a Nat exponent.
Instances : Double