diff options
-rw-r--r-- | libraries/base/GHC/Conc/Sync.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/base/GHC/Conc/Sync.hs b/libraries/base/GHC/Conc/Sync.hs index c51afb9d83..8bab43b966 100644 --- a/libraries/base/GHC/Conc/Sync.hs +++ b/libraries/base/GHC/Conc/Sync.hs @@ -624,10 +624,10 @@ data PrimMVar -- @hs_try_putmvar()@. The RTS wants a 'StablePtr' to the underlying -- 'MVar#', but a 'StablePtr#' can only refer to lifted types, so we -- have to cheat by coercing. -newStablePtrPrimMVar :: MVar () -> IO (StablePtr PrimMVar) +newStablePtrPrimMVar :: MVar a -> IO (StablePtr PrimMVar) newStablePtrPrimMVar (MVar m) = IO $ \s0 -> case makeStablePtr# (unsafeCoerce# m :: PrimMVar) s0 of - -- Coerce unlifted m :: MVar# RealWorld () + -- Coerce unlifted m :: MVar# RealWorld a -- to lifted PrimMVar -- apparently because mkStablePtr is not representation-polymorphic (# s1, sp #) -> (# s1, StablePtr sp #) |