#2325: Compile-time computations
--------------------------------------+-------------------------------------
 Reporter:  ajd                       |          Owner:             
     Type:  run-time performance bug  |         Status:  new        
 Priority:  normal                    |      Milestone:  6.10 branch
Component:  Compiler                  |        Version:  6.8.2      
 Severity:  normal                    |     Resolution:             
 Keywords:  constant folding          |     Difficulty:  Unknown    
 Testcase:                            |   Architecture:  Unknown    
       Os:  Unknown                   |  
--------------------------------------+-------------------------------------
Changes (by igloo):

  * milestone:  => 6.10 branch

Comment:

 Can we do the rule at an earlier point, i.e.
 {{{
 (fromInteger <numeric literal x>) + (fromInteger <numeric literal y>)
   ==>
 (fromInteger <numeric literal (x + y)>)
 }}}
 where we have inferred that the type is `Integer`? Then we don't have to
 worry about any checking that we don't already do.

 Re word size differences, we already have that problem when we transform
 {{{
 (fromInteger 3)
 }}}
 into
 {{{
 S# 3
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2325#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to