[#705] Parameterize generators with a Range
Description
Problem: Cleveland exposes many hedgehog generators.
For some types, like Mutez
, we provide two generators. One that
generates an arbitrary value among all possible values (genMutez
)
and another that lets the user specify the range (genMutez'
).
We should do this across the board, where it makes sense.
Additionally, it might be good to avoid duplicating the interface.
Solution: Define instances Default (Range a)
for types of interest
(occasionally wrapped in newtypes). Add range parameters to generators
where it makes sense.
Additionally, I've discovered that genValidType
doesn't use its
mustBeValid
argument, so that's been removed.
Related issue(s)
Resolves #705 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Nikolay Yakimov