From dd65cc3bae60f130d3f49d320672f21271261677 Mon Sep 17 00:00:00 2001 From: Torsten Schmits Date: Tue, 4 Jan 2022 23:45:25 +0100 Subject: [PATCH] fix typo --- src/Polysemy/Internal/Writer.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Polysemy/Internal/Writer.hs b/src/Polysemy/Internal/Writer.hs index f83d4c9..d92c701 100644 --- a/src/Polysemy/Internal/Writer.hs +++ b/src/Polysemy/Internal/Writer.hs @@ -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 #-}