aboutsummaryrefslogtreecommitdiffstats
path: root/src/Verismith/Fuzz.hs
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2019-10-06 22:40:06 +0100
committerYann Herklotz <git@yannherklotz.com>2019-10-06 22:58:18 +0100
commit5815e527f7e3b65078e2ad19df3538bb701ec7ac (patch)
tree527effa2e0c39c1ba92745a60993e26c38975888 /src/Verismith/Fuzz.hs
parent7377b2e83143fc45f83b0abc974aafbf6b6a3dfe (diff)
downloadverismith-5815e527f7e3b65078e2ad19df3538bb701ec7ac.tar.gz
verismith-5815e527f7e3b65078e2ad19df3538bb701ec7ac.zip
[Fix #63] Make build pass again
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)
-