Skip to content

Commit 56ce016

Browse files
committed
io-sim-por: parallelism in the lazy ST monad
1 parent d1d2eb9 commit 56ce016

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

io-sim/src/Control/Monad/IOSimPOR/QuickCheckUtils.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import Control.Monad.ST.Lazy.Unsafe (unsafeInterleaveST)
1010
import Test.QuickCheck.Gen
1111
import Test.QuickCheck.Property
1212

13-
-- note: this only evaluates `prop` in parallel, not `ST` actions
13+
-- note: it evaluates each `ST` action in parallel.
1414
conjoinParST :: TestableNoCatch prop => [ST s prop] -> ST s Property
1515
conjoinParST sts = do
16-
ps <- sequence sts
16+
ps <- sequence (unsafeInterleaveST <$> sts)
1717
return $ conjoinPar ps
1818

1919
-- Take the conjunction of several properties, in parallel This is a

0 commit comments

Comments
 (0)