git.iko.soy/distributed-process
on master help sign in
Remove dependency on ghc-prim.
faeab84Facundo Domínguez
distributed-process.cabal−1
@@ -51,7 +51,6 @@ Library
51 data-accessor >= 0.2 && < 0.3,
51 data-accessor >= 0.2 && < 0.3,
52 bytestring >= 0.9 && < 0.11,
52 bytestring >= 0.9 && < 0.11,
53 random >= 1.0 && < 1.2,
53 random >= 1.0 && < 1.2,
54− ghc-prim >= 0.2 && < 0.6,
55 distributed-static >= 0.2 && < 0.4,
54 distributed-static >= 0.2 && < 0.4,
56 rank1dynamic >= 0.1 && < 0.4,
55 rank1dynamic >= 0.1 && < 0.4,
57 syb >= 0.3 && < 0.7,
56 syb >= 0.3 && < 0.7,
src/Control/Distributed/Process/Internal/CQueue.hs+2−2
@@ -48,7 +48,7 @@ import Data.Maybe (fromJust)
48import Data.Traversable (traverse)
48import Data.Traversable (traverse)
49import GHC.MVar (MVar(MVar))
49import GHC.MVar (MVar(MVar))
50import GHC.IO (IO(IO), unIO)
50import GHC.IO (IO(IO), unIO)
51−import GHC.Prim (mkWeak#)
51+import GHC.Exts (mkWeak#)
52import GHC.Weak (Weak(Weak))
52import GHC.Weak (Weak(Weak))
53
53
54-- We use a TCHan rather than a Chan so that we have a non-blocking read
54-- 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
266-- | Weak reference to a CQueue
266-- | Weak reference to a CQueue
267mkWeakCQueue :: CQueue a -> IO () -> IO (Weak (CQueue a))
267mkWeakCQueue :: CQueue a -> IO () -> IO (Weak (CQueue a))
268mkWeakCQueue m@(CQueue (StrictMVar (MVar m#)) _ _) f = IO $ \s ->
268mkWeakCQueue 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)
270 case mkWeak# m# m (unIO f) s of (# s1, w #) -> (# s1, Weak w #)
270 case mkWeak# m# m (unIO f) s of (# s1, w #) -> (# s1, Weak w #)
271#else
271#else
272 case mkWeak# m# m f s of (# s1, w #) -> (# s1, Weak w #)
272 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
37 )
37 )
38import GHC.MVar (MVar(MVar))
38import GHC.MVar (MVar(MVar))
39import GHC.IO (IO(IO), unIO)
39import GHC.IO (IO(IO), unIO)
40−import GHC.Prim (mkWeak#)
40+import GHC.Exts (mkWeak#)
41import GHC.Weak (Weak(Weak))
41import GHC.Weak (Weak(Weak))
42
42
43newtype StrictMVar a = StrictMVar (MVar.MVar a)
43newtype StrictMVar a = StrictMVar (MVar.MVar a)
@@ -86,7 +86,7 @@ modifyMVarMasked (StrictMVar v) f =
86
86
87mkWeakMVar :: StrictMVar a -> IO () -> IO (Weak (StrictMVar a))
87mkWeakMVar :: StrictMVar a -> IO () -> IO (Weak (StrictMVar a))
88mkWeakMVar q@(StrictMVar (MVar m#)) f = IO $ \s ->
88mkWeakMVar q@(StrictMVar (MVar m#)) f = IO $ \s ->
89−#if MIN_VERSION_ghc_prim(0,5,0)
89+#if MIN_VERSION_base(4,9,0)
90 case mkWeak# m# q (unIO f) s of (# s', w #) -> (# s', Weak w #)
90 case mkWeak# m# q (unIO f) s of (# s', w #) -> (# s', Weak w #)
91#else
91#else
92 case mkWeak# m# q f s of (# s', w #) -> (# s', Weak w #)
92 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)
24import GHC.Conc
24import GHC.Conc
25import Data.Typeable (Typeable)
25import Data.Typeable (Typeable)
26import GHC.IO (IO(IO), unIO)
26import GHC.IO (IO(IO), unIO)
27−import GHC.Prim (mkWeak#)
27+import GHC.Exts (mkWeak#)
28import GHC.Weak (Weak(Weak))
28import GHC.Weak (Weak(Weak))
29
29
30--------------------------------------------------------------------------------
30--------------------------------------------------------------------------------
@@ -100,7 +100,7 @@ isEmptyTQueue (TQueue read write) = do
100
100
101mkWeakTQueue :: TQueue a -> IO () -> IO (Weak (TQueue a))
101mkWeakTQueue :: TQueue a -> IO () -> IO (Weak (TQueue a))
102mkWeakTQueue q@(TQueue _read (TVar write#)) f = IO $ \s ->
102mkWeakTQueue 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)
104 case mkWeak# write# q (unIO f) s of (# s', w #) -> (# s', Weak w #)
104 case mkWeak# write# q (unIO f) s of (# s', w #) -> (# s', Weak w #)
105#else
105#else
106 case mkWeak# write# q f s of (# s', w #) -> (# s', Weak w #)
106 case mkWeak# write# q f s of (# s', w #) -> (# s', Weak w #)