[GHC] #5262: Compiling with -O makes some expressions too lazy and causes space leaks

GHC cvs-ghc at haskell.org
Tue Jun 28 22:30:52 CEST 2011


#5262: Compiling with -O makes some expressions too lazy and causes space leaks
-------------------------------------------------+--------------------------
    Reporter:  michal.palka                      |        Owner:  simonmar                   
        Type:  bug                               |       Status:  new                        
    Priority:  normal                            |    Milestone:  7.4.1                      
   Component:  Compiler                          |      Version:  7.1                        
    Keywords:  laziness, strictness, space leak  |     Testcase:                             
   Blockedby:                                    |   Difficulty:                             
          Os:  Unknown/Multiple                  |     Blocking:                             
Architecture:  Unknown/Multiple                  |      Failure:  Incorrect result at runtime
-------------------------------------------------+--------------------------

Comment(by marlowsd@…):

 commit be5441799b7d94646dcd4bfea15407883537eaaa
 Author: Simon Marlow <marlowsd at gmail.com>
 Date:   Mon Jun 27 16:45:15 2011 +0100

     Add two new primops:

       seq#   :: a -> State# s -> (# State# s, a #)
       spark# :: a -> State# s -> (# State# s, a #)

     seq# is a version of seq that can be used in a State#-passing
     context.  We will use it to implement Control.Exception.evaluate and
     thus fix #5129.  Also we have plans to use it to fix #5262.

     spark# is to seq# as par is to pseq.  That is, it creates a spark in a
     State#-passing context.  We will use spark# and seq# to implement rpar
     and rseq respectively in an improved implementation of the Eval monad.

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



More information about the Glasgow-haskell-bugs mailing list