resize is a QuickCheck combinator that changes the internal size used by a generator. Size controls generated values: Int values use it as an absolute bound, while listOf uses it to influence list length. The default size is 30. section 9.4.1
Use resize when you need to control generated data externally:
- Increase the size to explore larger values or structures. section 9.4.1
- Keep custom generators size-aware by reading getSize when constructing values. section 9.4.1
- Let size propagate through nested generators unless deliberate resizing is required. section 9.4.1
Sampling larger integers
sample $ generate (resize 100 $ arbitrary :: Gen Int) produces integers within a much larger range than the default-sized generator; resize 10000 explores still larger values.
