any(?) tests using guards/discard will fail with GaveUp even when they should succeed
this test fails when used with hspec-hedgehog, but succeeds when run with the hedgehog check method
import Control.Monad (guard)
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import Test.Hspec
import Test.Hspec.Hedgehog
import Prelude
list :: MonadGen m => m a -> m [a]
list = Gen.list (Range.constant 0 3)
prop :: PropertyT IO ()
prop = do
l <- forAll (list Gen.bool)
let (h : _) = l
guard (l /= [])
head l === h
main :: IO ()
main = do
check $ property prop
hspec $ it "???" $ hedgehog prop
any(?) tests using guards/discard will fail with
GaveUp
even when they should succeedthis test fails when used with hspec-hedgehog, but succeeds when run with the hedgehog
check
method