king: Use modifyTVar' instead of modifyTVar.

We mostly used modifyTVar', but there were a few lazy cases.
This commit is contained in:
Elliot Glaysher 2020-09-23 10:51:59 -04:00
parent e7b69c9407
commit 37a52136ab
3 changed files with 5 additions and 5 deletions

View File

@ -138,7 +138,7 @@ ames' who isFake stderr = do
vail <- readTVar avail
if vail > 0
then do
modifyTVar avail (subtract 1)
modifyTVar' avail (subtract 1)
writeTQueue ventQ p
pure Intake
else do

View File

@ -191,7 +191,7 @@ clay env plan =
atomically $ plan (EvErr syncEv syncFailed)
atomically $ modifyTVar
atomically $ modifyTVar'
(cdMountPoints cd)
(applyActionsToMountPoints desk actions)
@ -206,7 +206,7 @@ clay env plan =
let hashedActions = map (calculateActionHash dir) actions
for_ hashedActions (performAction mountPoint)
atomically $ modifyTVar
atomically $ modifyTVar'
(cdMountPoints cd)
(applyActionsToMountPoints desk hashedActions)
@ -214,7 +214,7 @@ clay env plan =
logInfo $ displayShow ("(clay) ogre:", p, desk)
pierPath <- view pierPathL
removeDirectoryRecursive $ pierPath </> deskToPath desk
atomically $ modifyTVar (cdMountPoints cd) (M.delete desk)
atomically $ modifyTVar' (cdMountPoints cd) (M.delete desk)
-- Change the structures off of the event into something we can work with

View File

@ -126,7 +126,7 @@ client env plan = (initialEvents, runHttpClient)
newReq :: HttpClientDrv -> ReqId -> HttpClientReq -> RIO e ()
newReq drv id req = do
async <- runReq drv id req
atomically $ modifyTVar (hcdLive drv) (insertMap id async)
atomically $ modifyTVar' (hcdLive drv) (insertMap id async)
-- The problem with the original http client code was that it was written
-- to the idea of what the events "should have" been instead of what they