From abd765b122a560ce55f659261be134f57219508b Mon Sep 17 00:00:00 2001 From: Huw Campbell Date: Wed, 20 Mar 2019 21:58:49 +1100 Subject: [PATCH] Discard on failed pattern matches within a Generator --- hedgehog/src/Hedgehog/Internal/Gen.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hedgehog/src/Hedgehog/Internal/Gen.hs b/hedgehog/src/Hedgehog/Internal/Gen.hs index 4defdc7a..ba60c525 100644 --- a/hedgehog/src/Hedgehog/Internal/Gen.hs +++ b/hedgehog/src/Hedgehog/Internal/Gen.hs @@ -559,8 +559,8 @@ instance Monad m => Monad (GenT m) where Fail.fail instance Monad m => MonadFail (GenT m) where - fail = - error + fail _ = + discard instance Monad m => Alternative (GenT m) where empty =