mirror of
https://code.naskya.net/repos/ndqEd
synced 2025-03-20 15:14:54 +09:00
Build with LTS 13, GHC 8.6
This commit is contained in:
parent
b64984495f
commit
23e760e373
7 changed files with 24 additions and 29 deletions
src/Control/Concurrent
|
@ -62,14 +62,6 @@ newResultShare action = do
|
|||
tvar <- liftIO $ newTVarIO M.empty
|
||||
return $ ResultShare tvar action
|
||||
|
||||
-- TODO this is copied from stm-2.5, remove when we upgrade LTS
|
||||
stateTVar :: TVar s -> (s -> (a, s)) -> STM a
|
||||
stateTVar var f = do
|
||||
s <- readTVar var
|
||||
let (a, s') = f s -- since we destructure this, we are strict in f
|
||||
writeTVar var s'
|
||||
return a
|
||||
|
||||
runShared
|
||||
:: (MonadIO m, Eq k, Hashable k)
|
||||
=> ResultShare k v a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue