Skip to content

Commit faeab84

Browse files
Remove dependency on ghc-prim.
1 parent 6e7604e commit faeab84

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

distributed-process.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import Data.Maybe (fromJust)
4848
import Data.Traversable (traverse)
4949
import GHC.MVar (MVar(MVar))
5050
import GHC.IO (IO(IO), unIO)
51-
import GHC.Prim (mkWeak#)
51+
import GHC.Exts (mkWeak#)
5252
import 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
267267
mkWeakCQueue :: CQueue a -> IO () -> IO (Weak (CQueue a))
268268
mkWeakCQueue 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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import qualified Control.Concurrent.MVar as MVar
3737
)
3838
import GHC.MVar (MVar(MVar))
3939
import GHC.IO (IO(IO), unIO)
40-
import GHC.Prim (mkWeak#)
40+
import GHC.Exts (mkWeak#)
4141
import GHC.Weak (Weak(Weak))
4242

4343
newtype StrictMVar a = StrictMVar (MVar.MVar a)
@@ -86,7 +86,7 @@ modifyMVarMasked (StrictMVar v) f =
8686

8787
mkWeakMVar :: StrictMVar a -> IO () -> IO (Weak (StrictMVar a))
8888
mkWeakMVar 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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Prelude hiding (read)
2424
import GHC.Conc
2525
import Data.Typeable (Typeable)
2626
import GHC.IO (IO(IO), unIO)
27-
import GHC.Prim (mkWeak#)
27+
import GHC.Exts (mkWeak#)
2828
import GHC.Weak (Weak(Weak))
2929

3030
--------------------------------------------------------------------------------
@@ -100,7 +100,7 @@ isEmptyTQueue (TQueue read write) = do
100100

101101
mkWeakTQueue :: TQueue a -> IO () -> IO (Weak (TQueue a))
102102
mkWeakTQueue 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 #)

0 commit comments

Comments
 (0)