Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions src-control/Control/RefCount.hs
Original file line number Diff line number Diff line change
Expand Up @@ -203,24 +203,18 @@ class RefCounted m obj | obj -> m where
#endif

{-# SPECIALISE
newRef ::
RefCounted IO obj
=> IO ()
-> (RefCounter IO -> obj)
-> IO (Ref obj)
newRef ::
RefCounted IO obj
=> HasCallStackIfDebug
=> IO ()
-> (RefCounter IO -> obj)
-> IO (Ref obj)
#-}
-- | Make a new reference.
--
-- The given finaliser is run when the last reference is released. The
-- finaliser is run with async exceptions masked.
--
{-# SPECIALISE
newRef ::
RefCounted IO obj
=> IO ()
-> (RefCounter IO -> obj)
-> IO (Ref obj)
#-}
newRef ::
(RefCounted m obj, PrimMonad m)
=> HasCallStackIfDebug
Expand All @@ -239,6 +233,7 @@ newRef finaliser mkObject = do
{-# SPECIALISE
releaseRef ::
RefCounted IO obj
=> HasCallStackIfDebug
=> Ref obj
-> IO ()
#-}
Expand Down Expand Up @@ -273,7 +268,8 @@ deRef ref@Ref{refobj} =

{-# SPECIALISE
withRef ::
Ref obj
HasCallStackIfDebug
=> Ref obj
-> (obj -> IO a)
-> IO a
#-}
Expand All @@ -295,6 +291,7 @@ withRef ref@Ref{refobj} f = do
{-# SPECIALISE
dupRef ::
RefCounted IO obj
=> HasCallStackIfDebug
=> Ref obj
-> IO (Ref obj)
#-}
Expand Down Expand Up @@ -333,6 +330,7 @@ mkWeakRefFromRaw obj = WeakRef obj
{-# SPECIALISE
deRefWeak ::
RefCounted IO obj
=> HasCallStackIfDebug
=> WeakRef obj
-> IO (Maybe (Ref obj))
#-}
Expand Down
Loading