Skip to content

Commit 0943b64

Browse files
committed
io-sim-por: compareTraces should not drop any events
1 parent 1a5ba71 commit 0943b64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

io-sim/src/Control/Monad/IOSim.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,9 @@ compareTraces (Just passing) trace = unsafePerformIO $ do
473473
return $ SimTrace tpass tidpass tlpass EventThreadSleep $
474474
wakeup sleeper tidpass fail
475475
go _ _ fail = fail
476-
wakeup sleeper tidpass (SimTrace tfail tidfail tlfail evfail fail')
476+
wakeup sleeper tidpass fail@(SimTrace tfail tidfail tlfail evfail fail')
477477
| tidpass == tidfail =
478-
SimTrace tfail tidfail tlfail EventThreadWake fail'
478+
SimTrace tfail tidfail tlfail EventThreadWake fail
479479
| otherwise = unsafePerformIO $ do
480480
Just (slp,racing) <- readIORef sleeper
481481
writeIORef sleeper $ Just (slp,Set.insert (tidfail,tlfail) racing)

0 commit comments

Comments
 (0)