Fix docs and version
commit5d2ef0a692eddada1cc0731d7f9afe08dfafd9b8
authorAleksey Uymanov <s9gf4ult@gmail.com>
dateTue 3 Aug 2021, 18:14 (5 years ago)
parent0a1f9dc
CHANGELOG.md+2−1
@@ -1,8 +1,9 @@
1−0.3.0
1+1.0.0
22-----
33
44* Fixed issue with too big terms in case of recursive types
55* Recpect the `size` argument
6+* Types with parameters require `Arg` now
67
780.2.0
89-----
README.md+17
@@ -19,3 +19,20 @@ instance Arbitrary Expr where
1919 arbitrary = genericArbitrary
2020 shrink = genericShrink
2121```
22+
23+if type has an argument then `Arg` is required
24+
25+``` haskell
26+data Expr lit
27+ = Lit lit
28+ | Add Expr Expr
29+ | Mul Expr Expr
30+ deriving (Eq, Show, Generic)
31+
32+instance
33+ ( Arbitrary lit
34+ , Arg (Expr lit) lit
35+ ) => Arbitrary (Expr lit) where
36+ arbitrary = genericArbitrary
37+ shrink = genericShrink
38+```
generic-arbitrary.cabal+1−1
@@ -1,5 +1,5 @@
11name: generic-arbitrary
2−version: 0.3.0
2+version: 1.0.0
33synopsis: Generic implementation for QuickCheck's Arbitrary
44description:
55 Generic implementations of methods of the 'Arbitrary' class from the