summaryrefslogtreecommitdiff
path: root/testsuite/tests/concurrent
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/concurrent')
-rw-r--r--testsuite/tests/concurrent/should_run/compareAndSwap.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/tests/concurrent/should_run/compareAndSwap.hs b/testsuite/tests/concurrent/should_run/compareAndSwap.hs
index a55734a9bd..ac6c6b1965 100644
--- a/testsuite/tests/concurrent/should_run/compareAndSwap.hs
+++ b/testsuite/tests/concurrent/should_run/compareAndSwap.hs
@@ -19,7 +19,7 @@ import Control.Monad
casArrayST :: MutableArray s a -> Int -> a -> a -> ST s (Bool, a)
casArrayST (MutableArray arr#) (I# i#) old new = ST$ \s1# ->
case casArray# arr# i# old new s1# of
- (# s2#, x#, res #) -> (# s2#, (x# ==# 0#, res) #)
+ (# s2#, x#, res #) -> (# s2#, (isTrue# (x# ==# 0#), res) #)
casSTRef :: STRef s a -- ^ The 'STRef' containing a value 'current'
-> a -- ^ The 'old' value to compare
@@ -30,7 +30,7 @@ casSTRef (STRef var#) old new = ST $ \s1# ->
-- Zero means the CAS worked, one that it didn't.
-- We flip that here:
case casMutVar# var# old new s1# of
- (# s2#, x#, res #) -> (# s2#, (x# ==# 0#, res) #)
+ (# s2#, x#, res #) -> (# s2#, (isTrue# (x# ==# 0#), res) #)
-- | Performs a machine-level compare and swap operation on an
-- 'IORef'. Returns a tuple containing a 'Bool' which is 'True' when a