#2962: Fix space leak in genericLength
------------------------------+---------------------------------------------
 Reporter:  thorkilnaur       |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Milestone:                  
Component:  libraries/base    |        Version:  6.11            
 Severity:  normal            |     Resolution:                  
 Keywords:                    |       Testcase:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
------------------------------+---------------------------------------------
Comment (by NeilMitchell):

 The patch is incorrect. If the (+) function isn't strict in both arguments
 then you are too strict.

 You could always add genericLength', and add specialisation rules for
 genericLength on Int/Integer/Float/Double, which gets you all the benefits
 in the common cases but still preserves the semantics.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2962#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to