PROPOSAL: Restrict the type of (^), (^^), and add genericPower, genericPower'

David Benbennick dbenbenn at
Sat Nov 17 14:00:55 EST 2007

I vote against this proposal.

On 11/17/07, Ian Lynagh <igloo at> wrote:
> In my experience this would remove 99.9% of all defaulting (mostly where
> you write things like x^12 and 8^12), which means it's easier to get
> -Wall clean without having to put :: Int annotations everywhere.

I agree that is a benefit (making it easier to avoid warnings), but in
my opinion it is a tiny benefit.  I don't see any other benefits to
this proposal.  And I am strongly against making the standard library
more complicated by adding multiple functions that do the same thing
(^ and genericPower).

The inverse proposal has the same benefit, and doesn't require a
change to GHC: just add intPower to your own code, and use it wherever
you want.  If you are unhappy with the idea of using intPower, perhaps
you understand why I'm unhappy with the prospect of having to use

More information about the Libraries mailing list