@@ -46,7 +46,7 @@ import Control.Concurrent (forkIO)
4646import Control.Concurrent.STM.TChan
4747 (tryReadTChan, TChan, readTChan, writeTChan, newTChanIO)
4848import Control.Concurrent.STM.TVar
49− (writeTVar, readTVar, readTVarIO, modifyTVar, newTVarIO)
49+ (writeTVar, readTVar, readTVarIO, modifyTVar', newTVarIO)
5050import Control.Concurrent.MVar
5151 (MVar, MVar, putMVar, takeMVar, newEmptyMVar)
5252
@@ -151,8 +151,8 @@ runJavaScript sendBatch entryPoint = do
151151 (ThrowJSValue (JSValueReceived v)) -> throwIO $ JSException (JSVal v)
152152 r -> return r
153153 , doSendAsyncCommand = \cmd -> cmd `deepseq` atomically (writeTChan commandChan $ Left cmd)
154− , addCallback = \(Object (JSVal val)) cb -> atomically $ modifyTVar callbacks (M.insert val cb)
155− , freeCallback = \(Object (JSVal val)) -> atomically $ modifyTVar callbacks (M.delete val)
154+ , addCallback = \(Object (JSVal val)) cb -> atomically $ modifyTVar' callbacks (M.insert val cb)
155+ , freeCallback = \(Object (JSVal val)) -> atomically $ modifyTVar' callbacks (M.delete val)
156156 , nextRef = nextRef'
157157 }
158158 let processResults = \case