[Haskell-cafe] (**) over integers

ajb at spamcop.net ajb at spamcop.net
Wed Jun 15 00:39:49 EDT 2005


G'day all.

Quoting Maurício <briqueabraque at yahoo.com>:

> but I see that I can't because ** only operates on floats. Is there an
> equivalent operator that works on integers? How should I do that?

Prelude> :t (**)
(**) :: forall a. (Floating a) => a -> a -> a
Prelude> :t (^)
(^) :: forall a b. (Integral b, Num a) => a -> b -> a

Hope this helps.

Cheers,
Andrew Bromage


More information about the Haskell-Cafe mailing list