#7493: STM and TVar report incorrect results
---------------------------------+------------------------------------------
    Reporter:  parcs             |       Owner:                             
        Type:  bug               |      Status:  merge                      
    Priority:  highest           |   Milestone:  7.6.2                      
   Component:  Runtime System    |     Version:  7.6.1                      
    Keywords:                    |          Os:  Unknown/Multiple           
Architecture:  Unknown/Multiple  |     Failure:  Incorrect result at runtime
  Difficulty:  Unknown           |    Testcase:                             
   Blockedby:                    |    Blocking:                             
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by simonmar):

  * priority:  normal => highest
  * difficulty:  => Unknown
  * status:  new => merge
  * milestone:  => 7.6.2


Comment:

 Fixed (sorry, I didn't notice that you'd filed a ticket until just now):

 commit f184d9caffa09750ef6a374a7987b9213d6db28e
 {{{
 Author: Simon Marlow <marlo...@gmail.com>
 Date:   Mon Dec 10 12:00:54 2012 +0000

     Fix a bug in the handling of nested orElse

     Exposed by the following snippet, courtesy of Bas van Dijk and Patrick
     Palka on librar...@haskell.org:

     import Control.Concurrent.STM
     main = do
       x <- atomically $ do
              t <- newTVar 1
              writeTVar t 2
              ((readTVar t >> retry) `orElse` return ()) `orElse` return ()
              readTVar t
       print x
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to