Skip to content

Commit

Permalink
Replace deprecated symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
rvl committed Nov 27, 2020
1 parent 79c94bb commit 8a82455
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/core/src/Ouroboros/Network/Client/Wallet.hs
Expand Up @@ -58,7 +58,7 @@ import Control.Monad.Class.MonadSTM
, TQueue
, atomically
, isEmptyTQueue
, newEmptyTMVarM
, newEmptyTMVarIO
, putTMVar
, readTQueue
, takeTMVar
Expand Down Expand Up @@ -594,7 +594,7 @@ send
-> ((a -> m ()) -> cmd m)
-> m a
send queue cmd = do
tvar <- newEmptyTMVarM
tvar <- newEmptyTMVarIO
atomically $ writeTQueue queue (cmd (atomically . putTMVar tvar))
atomically $ takeTMVar tvar

Expand Down
4 changes: 2 additions & 2 deletions lib/shelley/src/Cardano/Wallet/Shelley/Network.hs
Expand Up @@ -101,7 +101,7 @@ import Control.Monad.Class.MonadSTM
, isEmptyTMVar
, modifyTVar'
, newEmptyTMVar
, newTMVarM
, newTMVarIO
, newTQueue
, newTVar
, putTMVar
Expand Down Expand Up @@ -918,7 +918,7 @@ newObserver tr fetch = do
-- since the previous time it was called.
debounce :: (Eq a, MonadSTM m) => (a -> m ()) -> m (a -> m ())
debounce action = do
mvar <- newTMVarM Nothing
mvar <- newTMVarIO Nothing
pure $ \cur -> do
prev <- atomically $ takeTMVar mvar
unless (Just cur == prev) $ action cur
Expand Down

0 comments on commit 8a82455

Please sign in to comment.