Latest version: https://github.com/Lysxia/generic-random/blob/master/changelog.md
- Support GHC 9.2
- Add newtypes for
DerivingVia(thanks, blackheaven) - Drop compatibility with GHC 8.0 and 8.2
- Add option to use only coherent instances
- Export
SetSizedandSetUnsized - Drop compatibility with GHC 7
- Fix small typos in documentation.
- Add
ConstrGen(custom generators for fields specified by constructor name and index). - Stop requiring custom generators lists to be terminated by
:+ (), or to be lists at all. - Breaking minor change: when a record field has a different type than
a
FieldGencustom generator for the same field name, this is now a compilation error. This was simply ignored before. - Miscellaneous documentation improvements in
Generic.Randommodule.
-
Fix a bug where generators did not decrease the size parameter with single-field constructors
-
The sized generators now use a custom generator for lists. Use
genericArbitraryRecG ()to disable that. See tutorial for more information. -
Lists of custom generators are now constructed using
(:+)instead ofGenList -
Rename
FieldtoFieldGen -
Add
Gen1,Gen1_(custom generators for unary type constructors) -
Add
listOf',listOf1',vectorOf' -
Remove deprecated module
Generic.Random.Generic
- Improved performance
- Fix build for GHC<8
- Add option to specify custom generators for certain fields,
overriding Arbitrary instances
- Add
genericArbitraryG,genericArbitraryUG,genericArbitrarySingleG,genericArbitraryRecG
- Add
- Add
GArbitraryandGUniformWeightsynonyms - Deprecate
Generic.Random.Generic - Remove
weightsfrom the external API
- Make the main module
Generic.Random - Rework generic base case generation
- You can explicitly provide a trivial generator (e.g., returning a
nullary constructor) using
withBaseCase - Generically derive
BaseCaseSearchand letBaseCasefind small values, no depth parameter must be specified anymore
- You can explicitly provide a trivial generator (e.g., returning a
nullary constructor) using
- Add
genericArbitrarySingle,genericArbitraryRec,genericArbitraryU' - Deprecate
weights - Fixed bug with
genericArbitrary'not dividing the size parameter
- Turn off dependency on boltzmann-samplers by default
- Add
genericArbitraryU,genericArbitraryU0andgenericArbitraryU1 - Compatible with GHC 7.8.4 and GHC 7.10.3
- Move Boltzmann sampler modules to another package: boltzmann-samplers
- Check well-formedness of constructor distributions at compile time.
- No longer support GHC 7.10.3 (the above feature relies on Generic information which does not exist before GHC 8)
- Support GHC 7.10.3
- Replace
TypeApplicationswith ad-hoc data types ingenericArbitraryFrequency'/genericArbitrary'