Does QuickCheck have a way to pass an Args object (or at least specify the seed) to the generate (:: Gen a -> IO a)
function (or something equivalent)?
I see that it has quickCheckWith
which takes an Args, but it can only return a Result. There doesn't seem to be a generateWith
function.
Asked
Active
Viewed 72 times
0

Willem Van Onsem
- 443,496
- 30
- 428
- 555

dspyz
- 5,280
- 2
- 25
- 63
-
1`Gen` couldn't do anything with an `Args`. You can specify the seed manually by simply deconstructing the `Gen` datatype by pattern matching or using `unGen`. – user2407038 Apr 09 '15 at 20:07
-
I tried that. unGen isn't visible (is it?) – dspyz Apr 09 '15 at 20:37
-
2You need to import Test.QuickCheck.Gen. – user2407038 Apr 09 '15 at 22:43