#3234: foldr/single no longer firing in GHC 6.10
-----------------------------+----------------------------------------------
Reporter:  r6                |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  6.10.3            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 consider the following module

 {{{module Foo where x = ['x']++"haskell"}}}

 when {{{ghc --make -O2 Foo.hs -ddump-simpl-stats}}}  is run using GHC
 6.8.2, the output show that the foldr/single rule is fired

 {{{
 5 RuleFired
     1 ++
     1 augment/build
     1 foldr/single
     1 unpack
     1 unpack-list
 }}}

 However, I am told that this does not happen in GHC 6.10.2 nor GHC 6.10.3
 where foldr/app is fired instead

 {{{
 6 RuleFired
      1 ++
      1 augment/build
      1 fold/build
      1 foldr/app
      1 unpack
      1 unpack-list
 }}}

 Thus it appears that the above module is no longer properly optimized in
 GHC 6.10

 (thanks to dons and Jedai for helping with this)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3234>
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