git.iko.soy/distributed-process
on master help sign in
Add StrictMVar.readMVar.
0e12380Facundo Domínguez
src/Control/Distributed/Process/Internal/StrictMVar.hs+5
@@ -6,6 +6,7 @@ module Control.Distributed.Process.Internal.StrictMVar
6 , newMVar
6 , newMVar
7 , takeMVar
7 , takeMVar
8 , putMVar
8 , putMVar
9+ , readMVar
9 , withMVar
10 , withMVar
10 , modifyMVar_
11 , modifyMVar_
11 , modifyMVar
12 , modifyMVar
@@ -21,6 +22,7 @@ import qualified Control.Concurrent.MVar as MVar
21 , newMVar
22 , newMVar
22 , takeMVar
23 , takeMVar
23 , putMVar
24 , putMVar
25+ , readMVar
24 , withMVar
26 , withMVar
25 , modifyMVar_
27 , modifyMVar_
26 , modifyMVar
28 , modifyMVar
@@ -44,6 +46,9 @@ takeMVar (StrictMVar v) = MVar.takeMVar v
44putMVar :: StrictMVar a -> a -> IO ()
46putMVar :: StrictMVar a -> a -> IO ()
45putMVar (StrictMVar v) x = evaluate x >> MVar.putMVar v x
47putMVar (StrictMVar v) x = evaluate x >> MVar.putMVar v x
46
48
49+readMVar :: StrictMVar a -> IO a
50+readMVar (StrictMVar v) = MVar.readMVar v
51+
47withMVar :: StrictMVar a -> (a -> IO b) -> IO b
52withMVar :: StrictMVar a -> (a -> IO b) -> IO b
48withMVar (StrictMVar v) = MVar.withMVar v
53withMVar (StrictMVar v) = MVar.withMVar v
49
54