qcheck icon indicating copy to clipboard operation
qcheck copied to clipboard

QCheck2: how to build a generator with a custom shrinker?

Open vch9 opened this issue 3 years ago • 0 comments

Lets say I want to use my own shrinker (e.g. shrink a list from the start to the end), what should I use?

My first thought was to use make_primitive but it requires a gen: Random.State.t -> 'a instead of a QCheck2.Gen.t.

I know a convenient solution is to use QCheck but in my particular use we plan to use QCheck2 everywhere, thus, wipe every use of QCheck.

vch9 avatar Jan 14 '22 14:01 vch9