#1642: Space leak Control.Monad.Strict
--------------------------------+-------------------------------------------
  Reporter:  [EMAIL PROTECTED]  |          Owner:         
      Type:  support request    |         Status:  new    
  Priority:  normal             |      Milestone:         
 Component:  Compiler           |        Version:  6.7    
  Severity:  critical           |       Keywords:         
Difficulty:  Unknown            |             Os:  Unknown
  Testcase:                     |   Architecture:  Unknown
--------------------------------+-------------------------------------------
I wrote some code depending on Control.Monad.State.Strict, with the
 assumption that it would run in constant space. This assumption was wrong.
 Why? I included a runnable example.

 {{{
 import Control.Monad.State.Strict

 data Foo = Foo !Int !Int deriving Show

 foo = flip runState (Foo 1 2)
            (forever $
                Control.Monad.State.Strict.modify (\(Foo a b) -> Foo a
 (b+1))
            )
 main = putStrLn (show foo)
 }}}

 I labeled it "critical", since not being able to use the State monad is
 making the code less expressive.

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