Skip to content

Commit e499136

Browse files
carbolymernewhoggy
authored andcommitted
Fix missing call sites for short-circuiting functions
1 parent a7bb132 commit e499136

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Hedgehog/Extras/Test/Base.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ nothingFail r = GHC.withFrozenCallStack $ case r of
307307

308308
-- | Fail when the computed result is Nothing.
309309
nothingFailM :: (MonadTest m, HasCallStack) => m (Maybe a) -> m a
310-
nothingFailM f = f >>= nothingFail
310+
nothingFailM f = GHC.withFrozenCallStack $ f >>= nothingFail
311311

312312
-- | Fail when the result is Left.
313313
leftFail :: (MonadTest m, Show e, HasCallStack) => Either e a -> m a
@@ -317,7 +317,7 @@ leftFail r = GHC.withFrozenCallStack $ case r of
317317

318318
-- | Fail when the computed result is Left.
319319
leftFailM :: (MonadTest m, Show e, HasCallStack) => m (Either e a) -> m a
320-
leftFailM f = f >>= leftFail
320+
leftFailM f = GHC.withFrozenCallStack $ f >>= leftFail
321321

322322
maybeAt :: Int -> [a] -> Maybe a
323323
maybeAt n xs
@@ -361,7 +361,7 @@ jsonErrorFail r = GHC.withFrozenCallStack $ case r of
361361

362362
-- | Fail when the computed result is Error.
363363
jsonErrorFailM :: (MonadTest m, HasCallStack) => m (Result a) -> m a
364-
jsonErrorFailM f = f >>= jsonErrorFail
364+
jsonErrorFailM f = GHC.withFrozenCallStack $ f >>= jsonErrorFail
365365

366366
-- | Run the operation 'f' once a second until it returns 'True' or the deadline expires.
367367
--

0 commit comments

Comments
 (0)