aboutsummaryrefslogtreecommitdiffstats
path: root/src/Verismith/Fuzz.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Verismith/Fuzz.hs')
-rw-r--r--src/Verismith/Fuzz.hs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/Verismith/Fuzz.hs b/src/Verismith/Fuzz.hs
index 2e0c95f..1f86739 100644
--- a/src/Verismith/Fuzz.hs
+++ b/src/Verismith/Fuzz.hs
@@ -454,13 +454,9 @@ sampleSeed s gen =
"Hedgehog.Gen.sample: too many discards, could not generate a sample"
else do
seed <- maybe Hog.random return s
- case
- runIdentity
- . runMaybeT
- . Hog.runTree
- $ Hog.runGenT 30 seed gen
- of
- Nothing -> loop (n - 1)
- Just x -> return (seed, Hog.nodeValue x)
+ case Hog.evalGen 30 seed gen of
+ Nothing ->
+ loop (n - 1)
+ Just x ->
+ pure (seed, Hog.treeValue x)
in loop (100 :: Int)
-