@@ -200,9 +200,9 @@ class RefCounted obj where
200200 getRefCounter :: obj -> RefCounter (FinaliserM obj )
201201
202202#ifdef NO_IGNORE_ASSERTS
203- #define HAS_CALL_STACK => HasCallStack
203+ #define HasCallStackIfDebug HasCallStack
204204#else
205- #define HAS_CALL_STACK
205+ #define HasCallStackIfDebug ()
206206#endif
207207
208208-- GHC says specialising is too complicated! But it's ok, each of these can
@@ -219,7 +219,7 @@ class RefCounted obj where
219219--
220220newRef ::
221221 (RefCounted obj , FinaliserM obj ~ m , PrimMonad m )
222- HAS_CALL_STACK
222+ => HasCallStackIfDebug
223223 => m ()
224224 -> (RefCounter m -> obj )
225225 -> m (Ref obj )
@@ -234,7 +234,7 @@ newRef finaliser mkObject = do
234234--
235235releaseRef ::
236236 (RefCounted obj , FinaliserM obj ~ m , PrimMonad m , MonadMask m )
237- HAS_CALL_STACK
237+ => HasCallStackIfDebug
238238 => Ref obj
239239 -> m ()
240240releaseRef ref@ Ref {refobj} = do
@@ -268,7 +268,7 @@ deRef ref@Ref{refobj} =
268268withRef ::
269269 forall m obj a .
270270 PrimMonad m
271- HAS_CALL_STACK
271+ => HasCallStackIfDebug
272272 => Ref obj
273273 -> (obj -> m a )
274274 -> m a
@@ -280,7 +280,7 @@ withRef ref@Ref{refobj} f = do
280280--
281281dupRef ::
282282 (RefCounted obj , FinaliserM obj ~ m , PrimMonad m )
283- HAS_CALL_STACK
283+ => HasCallStackIfDebug
284284 => Ref obj
285285 -> m (Ref obj )
286286dupRef ref@ Ref {refobj} = do
@@ -313,7 +313,7 @@ mkWeakRefFromRaw obj = WeakRef obj
313313--
314314deRefWeak ::
315315 (RefCounted obj , FinaliserM obj ~ m , PrimMonad m )
316- HAS_CALL_STACK
316+ => HasCallStackIfDebug
317317 => WeakRef obj
318318 -> m (Maybe (Ref obj ))
319319deRefWeak (WeakRef obj) = do
0 commit comments