[GHC] #826: Optimization breaks strictness with IO

GHC trac at galois.com
Sat Jul 15 04:47:09 EDT 2006


#826: Optimization breaks strictness with IO
-------------------------------+--------------------------------------------
    Reporter:  aljee at hyper.cx  |        Owner:         
        Type:  bug             |       Status:  new    
    Priority:  normal          |    Milestone:         
   Component:  Compiler        |      Version:  6.4.2  
    Severity:  minor           |     Keywords:         
          Os:  Unknown         |   Difficulty:  Unknown
Architecture:  Unknown         |  
-------------------------------+--------------------------------------------
The following program fails with exception when compiled with -O0, but
 terminates successfully when compiled with -O.

 {{{
 module Main(main) where

 import Control.Concurrent.MVar

 f l =undefined `seq` putStrLn "q"

 main = do
   mv <- newMVar ()
   f () `seq` putStrLn "Hello"
 }}}

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


More information about the Glasgow-haskell-bugs mailing list