Skip to content

Commit

Permalink
Stylish-Haskell formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogesh Sajanikar committed Aug 2, 2022
1 parent 2cb9b16 commit 728ca99
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions io-sim/src/Control/Monad/IOSim/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ execAtomically !time !tid !tlbl !nextVid0 action0 k0 =

ThrowStm e ->
{-# SCC "execAtomically.go.ThrowStm" #-}
case ctl of
case ctl of
AtomicallyFrame -> do
-- Revert all the TVar writes
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
Expand All @@ -910,19 +910,19 @@ execAtomically !time !tid !tlbl !nextVid0 action0 k0 =
-- Execute the catch handler with an empty written set
let ctl'' = BranchFrame EmptyStmA k writtenOuter writtenOuterSeq createdOuterSeq ctl'
go ctl'' read Map.empty [] [] nextVid (h e)
--
--
BranchFrame _ _k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
{-# SCC "execAtomically.go.branchFrame" #-} do
-- Revert all the TVar writes within this orElse
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
go ctl' read writtenOuter writtenOuterSeq createdOuterSeq nextVid (ThrowStm e)

CatchStm a h k ->
CatchStm a h k ->
{-# SCC "execAtomically.go.ThrowStm" #-} do
-- Execute the left side in a new frame with an empty written set
let ctl' = BranchFrame (CatchStmA h) k written writtenSeq createdSeq ctl
go ctl' read Map.empty [] [] nextVid a


Retry ->
{-# SCC "execAtomically.go.Retry" #-}
Expand Down
2 changes: 1 addition & 1 deletion io-sim/src/Control/Monad/IOSim/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ instance Exceptions.MonadThrow (STM s) where
instance MonadCatch (STM s) where

catch action handler = STM $ oneShot $ \k -> CatchStm (runSTM action) (runSTM . handler') k
where
where
handler' e = case fromException e of
Nothing -> throwIO e -- Rethrow the exception if handler does not handle it.
Just e' -> handler e'
Expand Down
6 changes: 3 additions & 3 deletions io-sim/src/Control/Monad/IOSimPOR/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ execAtomically time tid tlbl nextVid0 action0 k0 =

ThrowStm e ->
{-# SCC "execAtomically.go.ThrowStm" #-}
case ctl of
case ctl of
AtomicallyFrame -> do
-- Revert all the TVar writes
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
Expand All @@ -1121,14 +1121,14 @@ execAtomically time tid tlbl nextVid0 action0 k0 =
-- Execute the catch handler with an empty written set
let ctl'' = BranchFrame EmptyStmA k writtenOuter writtenOuterSeq createdOuterSeq ctl'
go ctl'' read Map.empty [] [] nextVid (h e)
--
--
BranchFrame _ _k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
{-# SCC "execAtomically.go.branchFrame" #-} do
-- Revert all the TVar writes within this orElse
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
go ctl' read writtenOuter writtenOuterSeq createdOuterSeq nextVid (ThrowStm e)

CatchStm a h k ->
CatchStm a h k ->
{-# SCC "execAtomically.go.ThrowStm" #-} do
-- Execute the left side in a new frame with an empty written set
let ctl' = BranchFrame (CatchStmA h) k written writtenSeq createdSeq ctl
Expand Down

0 comments on commit 728ca99

Please sign in to comment.