Generator size is QuickCheck’s internal control for the scale of generated values. It defaults to 30, affects values such as Ints and lists, and can be changed with resize. section 9.4.1
Use generator size deliberately when building or inspecting generators:
- Read the current size with getSize and use it to bound generated parameters. section 9.4.1
- Let size propagate through nested generators unless you explicitly need resize. section 9.4.1
- Use sample to observe behavior across sizes from 0 through 20, or resize for targeted inspection. section 9.4.1
Bounding a rotation amount
A generator can obtain size with getSize and choose a rotation amount between -size and size, keeping test data proportional to the configured scale.
