git.iko.soy/distributed-process
on master help sign in
Remove dependency on ghc-prim.
commit8aed555334d59020f086ee07314d66f625c29ff3 authorFacundo Domínguez <facundo.dominguez@tweag.io> dateMon 6 Jun 2016, 12:31 (10 years ago) parent6a9ea4a
4 files changed+6−7
distributed-process.cabal−1 src/Control/Distributed/Process/Internal/CQueue.hs+2−2 src/Control/Distributed/Process/Internal/StrictMVar.hs+2−2 src/Control/Distributed/Process/Internal/WeakTQueue.hs+2−2
distributed-process.cabal−1
@@ -51,7 +51,6 @@ Library
5151 data-accessor >= 0.2 && < 0.3,
5252 bytestring >= 0.9 && < 0.11,
5353 random >= 1.0 && < 1.2,
54− ghc-prim >= 0.2 && < 0.6,
5554 distributed-static >= 0.2 && < 0.4,
5655 rank1dynamic >= 0.1 && < 0.4,
5756 syb >= 0.3 && < 0.7,
src/Control/Distributed/Process/Internal/CQueue.hs+2−2
@@ -48,7 +48,7 @@ import Data.Maybe (fromJust)
4848import Data.Traversable (traverse)
4949import GHC.MVar (MVar(MVar))
5050import GHC.IO (IO(IO), unIO)
51−import GHC.Prim (mkWeak#)
51+import GHC.Exts (mkWeak#)
5252import GHC.Weak (Weak(Weak))
5353
5454-- We use a TCHan rather than a Chan so that we have a non-blocking read
@@ -266,7 +266,7 @@ dequeue (CQueue arrived incoming size) blockSpec matchons = mask_ $ decrementJus
266266-- | Weak reference to a CQueue
267267mkWeakCQueue :: CQueue a -> IO () -> IO (Weak (CQueue a))
268268mkWeakCQueue m@(CQueue (StrictMVar (MVar m#)) _ _) f = IO $ \s ->
269−#if MIN_VERSION_ghc_prim(0,5,0)
269+#if MIN_VERSION_base(4,9,0)
270270 case mkWeak# m# m (unIO f) s of (# s1, w #) -> (# s1, Weak w #)
271271#else
272272 case mkWeak# m# m f s of (# s1, w #) -> (# s1, Weak w #)
src/Control/Distributed/Process/Internal/StrictMVar.hs+2−2
@@ -37,7 +37,7 @@ import qualified Control.Concurrent.MVar as MVar
3737 )
3838import GHC.MVar (MVar(MVar))
3939import GHC.IO (IO(IO), unIO)
40−import GHC.Prim (mkWeak#)
40+import GHC.Exts (mkWeak#)
4141import GHC.Weak (Weak(Weak))
4242
4343newtype StrictMVar a = StrictMVar (MVar.MVar a)
@@ -86,7 +86,7 @@ modifyMVarMasked (StrictMVar v) f =
8686
8787mkWeakMVar :: StrictMVar a -> IO () -> IO (Weak (StrictMVar a))
8888mkWeakMVar q@(StrictMVar (MVar m#)) f = IO $ \s ->
89−#if MIN_VERSION_ghc_prim(0,5,0)
89+#if MIN_VERSION_base(4,9,0)
9090 case mkWeak# m# q (unIO f) s of (# s', w #) -> (# s', Weak w #)
9191#else
9292 case mkWeak# m# q f s of (# s', w #) -> (# s', Weak w #)
src/Control/Distributed/Process/Internal/WeakTQueue.hs+2−2
@@ -24,7 +24,7 @@ import Prelude hiding (read)
2424import GHC.Conc
2525import Data.Typeable (Typeable)
2626import GHC.IO (IO(IO), unIO)
27−import GHC.Prim (mkWeak#)
27+import GHC.Exts (mkWeak#)
2828import GHC.Weak (Weak(Weak))
2929
3030--------------------------------------------------------------------------------
@@ -100,7 +100,7 @@ isEmptyTQueue (TQueue read write) = do
100100
101101mkWeakTQueue :: TQueue a -> IO () -> IO (Weak (TQueue a))
102102mkWeakTQueue q@(TQueue _read (TVar write#)) f = IO $ \s ->
103−#if MIN_VERSION_ghc_prim(0,5,0)
103+#if MIN_VERSION_base(4,9,0)
104104 case mkWeak# write# q (unIO f) s of (# s', w #) -> (# s', Weak w #)
105105#else
106106 case mkWeak# write# q f s of (# s', w #) -> (# s', Weak w #)