mirror of
https://github.com/polysemy-research/polysemy.git
synced 2024-12-26 07:24:30 +03:00
fix typo
This commit is contained in:
parent
791cd36001
commit
dd65cc3bae
@ -148,8 +148,8 @@ runWriterSTMAction write = interpretH $ \case
|
||||
-> o
|
||||
-> STM ()
|
||||
writeListen tvar switch = \o -> do
|
||||
alreadyCommited <- readTVar switch
|
||||
unless alreadyCommited $ do
|
||||
alreadyCommitted <- readTVar switch
|
||||
unless alreadyCommitted $ do
|
||||
s <- readTVar tvar
|
||||
writeTVar tvar $! s <> o
|
||||
write o
|
||||
@ -184,8 +184,8 @@ runWriterSTMAction write = interpretH $ \case
|
||||
o <- readTVar tvar
|
||||
let !o' = f o
|
||||
-- Likely redundant, but doesn't hurt.
|
||||
alreadyCommited <- readTVar switch
|
||||
unless alreadyCommited $
|
||||
alreadyCommitted <- readTVar switch
|
||||
unless alreadyCommitted $
|
||||
write o'
|
||||
writeTVar switch True
|
||||
{-# INLINE commitPass #-}
|
||||
|
Loading…
Reference in New Issue
Block a user