Skip to content
Snippets Groups Projects
Commit 5ea49271 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

MERGED: Fix a bug in the handling of nested orElse

    commit f184d9ca
    Author: Simon Marlow <marlowsd@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 libraries@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
parent 1183080b
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment