git.iko.soy/distributed-process
on master help sign in
Merge pull request #148 from tweag/add-readMVar

Oops - Add missing readMVar. Thanks Facundo Domínguez

commit330fbf468fc436f31e109e5c2db26e2489bf5516 authorTim Watson <watson.timothy@gmail.com> dateThu 10 Apr 2014, 02:28 (13 years ago) parentea1b3b80e12380
1 file changed+5
src/Control/Distributed/Process/Internal/StrictMVar.hs+5
src/Control/Distributed/Process/Internal/StrictMVar.hs+5
@@ -6,6 +6,7 @@ module Control.Distributed.Process.Internal.StrictMVar
66 , newMVar
77 , takeMVar
88 , putMVar
9+ , readMVar
910 , withMVar
1011 , modifyMVar_
1112 , modifyMVar
@@ -21,6 +22,7 @@ import qualified Control.Concurrent.MVar as MVar
2122 , newMVar
2223 , takeMVar
2324 , putMVar
25+ , readMVar
2426 , withMVar
2527 , modifyMVar_
2628 , modifyMVar
@@ -44,6 +46,9 @@ takeMVar (StrictMVar v) = MVar.takeMVar v
4446putMVar :: StrictMVar a -> a -> IO ()
4547putMVar (StrictMVar v) x = evaluate x >> MVar.putMVar v x
4648
49+readMVar :: StrictMVar a -> IO a
50+readMVar (StrictMVar v) = MVar.readMVar v
51+
4752withMVar :: StrictMVar a -> (a -> IO b) -> IO b
4853withMVar (StrictMVar v) = MVar.withMVar v
4954