Can we do something slightly nicer about (^)?

Every time someone writes, say, x^20, the literal exponent defaults to Integer. This is the wrong default whenever the literal is in the Word range. Fixing this goes beyond the capabilities of RULES pragmas, but I imagine it would be a fairly simple thing to accomplish in the internal rule language. David

Hi, Am Dienstag, den 26.04.2016, 10:33 -0400 schrieb David Feuer:
Fixing this goes beyond the capabilities of RULES pragmas
maybe it shouln’t: https://ghc.haskell.org/trac/ghc/ticket/9137 https://ghc.haskell.org/trac/ghc/ticket/9601 Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • https://www.joachim-breitner.de/ XMPP: nomeata@joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org

Let's fix it for the literal 2 :) Nobody worries about overflow of x * x
when x and the result are both declared Ints
On Tue, Apr 26, 2016 at 11:55 AM Joachim Breitner
Hi,
Am Dienstag, den 26.04.2016, 10:33 -0400 schrieb David Feuer:
Fixing this goes beyond the capabilities of RULES pragmas
maybe it shouln’t: https://ghc.haskell.org/trac/ghc/ticket/9137 https://ghc.haskell.org/trac/ghc/ticket/9601
Greetings, Joachim
-- Joachim “nomeata” Breitner mail@joachim-breitner.de • https://www.joachim-breitner.de/ XMPP: nomeata@joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
participants (3)
-
David Feuer
-
George Colpitts
-
Joachim Breitner