Skip to content

Commit abd765b

Browse files
committed
Discard on failed pattern matches within a Generator
1 parent 961479e commit abd765b

File tree

1 file changed

+2
-2
lines changed
  • hedgehog/src/Hedgehog/Internal

1 file changed

+2
-2
lines changed

hedgehog/src/Hedgehog/Internal/Gen.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ instance Monad m => Monad (GenT m) where
559559
Fail.fail
560560

561561
instance Monad m => MonadFail (GenT m) where
562-
fail =
563-
error
562+
fail _ =
563+
discard
564564

565565
instance Monad m => Alternative (GenT m) where
566566
empty =

0 commit comments

Comments
 (0)