[GHC] #1117: [2,4..10] is not a good list producer

GHC trac at galois.com
Wed Jan 24 11:05:23 EST 2007


#1117: [2,4..10] is not a good list producer
---------------------------------+------------------------------------------
 Reporter:  br1 at internet.com.uy  |          Owner:             
     Type:  feature request      |         Status:  new        
 Priority:  normal               |      Milestone:             
Component:  Compiler             |        Version:  6.6        
 Severity:  normal               |     Resolution:             
 Keywords:  rewrite rules        |     Difficulty:  Easy (1 hr)
 Testcase:                       |   Architecture:  Multiple   
       Os:  Multiple             |  
---------------------------------+------------------------------------------
Comment (by br1 at internet.com.uy):

 The function that should be changed is efdtInt in

 http://darcs.haskell.org/packages/base/GHC/Enum.lhs

 The comments acknowledge that it doesn't bother with rules and
 deforestation.

 The code that brings this up is a step on the imperative eratosthenes
 sieve algorithm:

 forM_ [2*i, 3*i .. n-1] (\j -> writeArray arr j False)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1117>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list