#4219: sequence is not tail recursive, doesn't work with large inputs in strict
monads
---------------------------------+------------------------------------------
    Reporter:  EyalLotem         |       Owner:                         
        Type:  bug               |      Status:  new                    
    Priority:  normal            |   Component:  Compiler               
     Version:  6.12.3            |    Keywords:  sequence tail recursive
          Os:  Unknown/Multiple  |    Testcase:                         
Architecture:  x86               |     Failure:  None/Unknown           
---------------------------------+------------------------------------------
 replicateM 10000000 (randomIO >>= evaluate)

 blows the stack because of "sequence".

 I think it is important for Haskell programmers to be able to compose
 existing components without having to worry about the operational
 semantics of laziness, so it is important for GHC to specialize "sequence"
 calls to a tail-recursive one when a strict monad is in use.

 Attached is the test case.

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