File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
io-sim/src/Control/Monad/IOSimPOR Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -1337,13 +1337,20 @@ racingEffects :: Effect -> Effect -> Bool
1337
1337
racingEffects e e' =
1338
1338
(effectLiftST e && racesWithLiftST e')
1339
1339
|| (effectLiftST e' && racesWithLiftST e )
1340
- || (not $ null $ effectThrows e `List.intersect` effectThrows e')
1341
- || (not $ effectReads e `Set.disjoint` effectWrites e'
1342
- && effectWrites e `Set.disjoint` effectReads e'
1343
- && effectWrites e `Set.disjoint` effectWrites e')
1344
- where racesWithLiftST eff =
1345
- effectLiftST eff
1346
- || not (Set. null (effectReads eff) && Set. null (effectWrites eff))
1340
+ || effectThrows e `intersectsL` effectThrows e'
1341
+ || effectReads e `intersects` effectWrites e'
1342
+ || effectWrites e `intersects` effectReads e'
1343
+ || effectWrites e `intersects` effectWrites e'
1344
+ where
1345
+ intersects :: Ord a => Set a -> Set a -> Bool
1346
+ intersects a b = not $ a `Set.disjoint` b
1347
+
1348
+ intersectsL :: Eq a => [a ] -> [a ] -> Bool
1349
+ intersectsL a b = not $ null $ a `List.intersect` b
1350
+
1351
+ racesWithLiftST eff =
1352
+ effectLiftST eff
1353
+ || not (Set. null (effectReads eff) && Set. null (effectWrites eff))
1347
1354
1348
1355
--
1349
1356
-- Steps
You can’t perform that action at this time.
0 commit comments