[GHC] #5557: Code using seq has wrong strictness (too lazy)

GHC cvs-ghc at haskell.org
Fri Oct 14 15:57:40 CEST 2011


#5557: Code using seq has wrong strictness (too lazy)
-------------------------------------------+--------------------------------
    Reporter:  michal.palka                |        Owner:                             
        Type:  bug                         |       Status:  new                        
    Priority:  high                        |    Milestone:  7.4.1                      
   Component:  Compiler                    |      Version:  7.2.1                      
    Keywords:  seq strictness strict lazy  |     Testcase:                             
   Blockedby:                              |   Difficulty:                             
          Os:  Unknown/Multiple            |     Blocking:                             
Architecture:  Unknown/Multiple            |      Failure:  Incorrect result at runtime
-------------------------------------------+--------------------------------
Changes (by igloo):

  * priority:  normal => high
  * milestone:  => 7.4.1


Comment:

 Hmm, very interesting:
 {{{
 Prelude> ([seq (seq undefined (\a -> error "a"))] !! 0) [1]
 [1]
 Prelude> ([seq (seq undefined (\a -> undefined))] !! 0) [1]
 *** Exception: Prelude.undefined
 }}}

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



More information about the Glasgow-haskell-bugs mailing list