Skip to content

Commit 4f59536

Browse files
committed
io-sim: code style
1 parent f6954b6 commit 4f59536

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ isThreadBlocked t = case threadStatus t of
105105
_ -> False
106106

107107
labelledTVarId :: TVar s a -> ST s (Labelled TVarId)
108-
labelledTVarId TVar { tvarId, tvarLabel } = (Labelled tvarId) <$> readSTRef tvarLabel
108+
labelledTVarId TVar { tvarId, tvarLabel } = Labelled tvarId <$> readSTRef tvarLabel
109109

110110
labelledThreads :: Map IOSimThreadId (Thread s a) -> [Labelled IOSimThreadId]
111111
labelledThreads threadMap =
@@ -1037,8 +1037,9 @@ execAtomically !time !tid !tlbl !nextVid0 action0 k0 =
10371037
-> TVarId -- var fresh name supply
10381038
-> StmA s b
10391039
-> ST s (SimTrace c)
1040-
go !ctl !read !written !writtenSeq !createdSeq !nextVid action = assert localInvariant $
1041-
case action of
1040+
go !ctl !read !written !writtenSeq !createdSeq !nextVid action =
1041+
assert localInvariant $
1042+
case action of
10421043
ReturnStm x ->
10431044
case ctl of
10441045
AtomicallyFrame -> do

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ instance MonadLabelledSTM (IOSim s) where
473473
labelTVar tvar label = STM $ \k -> LabelTVar label tvar (k ())
474474
labelTVarIO tvar label = IOSim $ oneShot $ \k ->
475475
LiftST ( lazyToStrictST $
476-
writeSTRef (tvarLabel tvar) $! (Just label)
476+
writeSTRef (tvarLabel tvar) $! Just label
477477
) k
478478
labelTQueue = labelTQueueDefault
479479
labelTBQueue = labelTBQueueDefault

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,8 +1362,9 @@ execAtomically time tid tlbl nextVid0 action0 k0 =
13621362
-> TVarId -- var fresh name supply
13631363
-> StmA s b
13641364
-> ST s (SimTrace c)
1365-
go !ctl !read !written !writtenSeq !createdSeq !nextVid action = assert localInvariant $
1366-
case action of
1365+
go !ctl !read !written !writtenSeq !createdSeq !nextVid action =
1366+
assert localInvariant $
1367+
case action of
13671368
ReturnStm x ->
13681369
case ctl of
13691370
AtomicallyFrame -> do

0 commit comments

Comments
 (0)