[Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

Simon Peyton-Jones simonpj at microsoft.com
Fri Jun 29 16:19:55 EDT 2007


| By the way, using Integer for exponents really shouldn't be less
| efficient -
| but it seems it is.
|
| The code for (^) should be something like this:
|
| {-# INLINE ^ #-}
| n ^ m = case toInteger m of
|           S# i -> powerInt# n i
|           J# a p -> powerGmp n a p

I've done something like this now.

Simon


More information about the Haskell-Cafe mailing list