Repository : ssh://darcs.haskell.org//srv/darcs/packages/stm On branch : master
http://hackage.haskell.org/trac/ghc/changeset/713c94cdf3127c96a4e1d377b4008b48b3b934ed >--------------------------------------------------------------- commit 713c94cdf3127c96a4e1d377b4008b48b3b934ed Author: Simon Marlow <[email protected]> Date: Mon Dec 10 12:18:33 2012 +0000 Add a test for orElse bug Fixed in GHC commit f184d9caffa09750ef6a374a7987b9213d6db28e, see that for more details. >--------------------------------------------------------------- tests/stm064.hs | 8 ++++++++ tests/stm064.stdout | 1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/tests/stm064.hs b/tests/stm064.hs new file mode 100644 index 0000000..a8ff170 --- /dev/null +++ b/tests/stm064.hs @@ -0,0 +1,8 @@ +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 diff --git a/tests/stm064.stdout b/tests/stm064.stdout new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/tests/stm064.stdout @@ -0,0 +1 @@ +2 _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
