Skip to content

Commit 9d2e67f

Browse files
author
Yogesh Sajanikar
committed
Add a correct cost center name, and correct the comments.
1 parent 728ca99 commit 9d2e67f

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ execAtomically !time !tid !tlbl !nextVid0 action0 k0 =
892892
tvarId tvar `Map.notMember` writtenOuter)
893893
writtenSeq
894894
++ writtenOuterSeq
895-
-- Skip the orElse right hand and continue with the k continuation
895+
-- Skip the right hand and continue with the k continuation
896896
go ctl' read written' writtenSeq' createdOuterSeq nextVid (k x)
897897

898898
ThrowStm e ->
@@ -904,16 +904,16 @@ execAtomically !time !tid !tlbl !nextVid0 action0 k0 =
904904
k0 $ StmTxAborted [] (toException e)
905905

906906
BranchFrame (CatchStmA h) k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
907-
{-# SCC "execAtomically.go.branchFrame" #-} do
908-
-- Revert all the TVar writes within this orElse
907+
{-# SCC "execAtomically.go.BranchFrame" #-} do
908+
-- Revert all the TVar writes within this catch
909909
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
910910
-- Execute the catch handler with an empty written set
911911
let ctl'' = BranchFrame EmptyStmA k writtenOuter writtenOuterSeq createdOuterSeq ctl'
912912
go ctl'' read Map.empty [] [] nextVid (h e)
913913
--
914914
BranchFrame _ _k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
915-
{-# SCC "execAtomically.go.branchFrame" #-} do
916-
-- Revert all the TVar writes within this orElse
915+
{-# SCC "execAtomically.go.BranchFrame" #-} do
916+
-- Revert all the TVar writes within this branch
917917
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
918918
go ctl' read writtenOuter writtenOuterSeq createdOuterSeq nextVid (ThrowStm e)
919919

@@ -943,7 +943,7 @@ execAtomically !time !tid !tlbl !nextVid0 action0 k0 =
943943

944944
BranchFrame _ _k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
945945
{-# SCC "execAtomically.go.BranchFrame" #-} do
946-
-- Revert all the TVar writes within this orElse branch
946+
-- Revert all the TVar writes within this branch
947947
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
948948
-- Skip the continuation and propagate the retry into the outer frame
949949
-- using the written set for the outer frame

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ execAtomically time tid tlbl nextVid0 action0 k0 =
11031103
tvarId tvar `Map.notMember` writtenOuter)
11041104
writtenSeq
11051105
++ writtenOuterSeq
1106-
-- Skip the orElse right hand and continue with the k continuation
1106+
-- Skip the right hand and continue with the k continuation
11071107
go ctl' read written' writtenSeq' createdOuterSeq nextVid (k x)
11081108

11091109
ThrowStm e ->
@@ -1115,16 +1115,16 @@ execAtomically time tid tlbl nextVid0 action0 k0 =
11151115
k0 $ StmTxAborted [] (toException e)
11161116

11171117
BranchFrame (CatchStmA h) k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
1118-
{-# SCC "execAtomically.go.branchFrame" #-} do
1119-
-- Revert all the TVar writes within this orElse
1118+
{-# SCC "execAtomically.go.BranchFrame" #-} do
1119+
-- Revert all the TVar writes within this catch
11201120
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
11211121
-- Execute the catch handler with an empty written set
11221122
let ctl'' = BranchFrame EmptyStmA k writtenOuter writtenOuterSeq createdOuterSeq ctl'
11231123
go ctl'' read Map.empty [] [] nextVid (h e)
11241124
--
11251125
BranchFrame _ _k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
1126-
{-# SCC "execAtomically.go.branchFrame" #-} do
1127-
-- Revert all the TVar writes within this orElse
1126+
{-# SCC "execAtomically.go.BranchFrame" #-} do
1127+
-- Revert all the TVar writes within this branch
11281128
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
11291129
go ctl' read writtenOuter writtenOuterSeq createdOuterSeq nextVid (ThrowStm e)
11301130

@@ -1153,7 +1153,7 @@ execAtomically time tid tlbl nextVid0 action0 k0 =
11531153

11541154
BranchFrame _ _k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
11551155
{-# SCC "execAtomically.go.BranchFrame" #-} do
1156-
-- Revert all the TVar writes within this orElse branch
1156+
-- Revert all the TVar writes within this branch
11571157
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
11581158
-- Skip the continuation and propagate the retry into the outer frame
11591159
-- using the written set for the outer frame

0 commit comments

Comments
 (0)