git.iko.soy/typeable/generic-arbitrary
on master help sign in
fix
a957f17Aleksey Uymanov
.gitignore+1
@@ -4,3 +4,4 @@ dist
4.cabal-sandbox/
4.cabal-sandbox/
5cabal.sandbox.config
5cabal.sandbox.config
6dist-newstyle
6dist-newstyle
7+TAGS
src/Test/QuickCheck/Arbitrary/Generic.hs+3−3
@@ -74,7 +74,7 @@ data R2 = R2 R1
74 deriving Arbitrary via (GenericArbitrary R2)
74 deriving Arbitrary via (GenericArbitrary R2)
75@
75@
76
76
77−This code will compile and the @arbitrary@ generated will always hand. Yes,
77+This code will compile and the @arbitrary@ generated will always hang. Yes,
78there is a problem with mutually recursive types.
78there is a problem with mutually recursive types.
79
79
80Now lets see an example of datatype with parameters
80Now lets see an example of datatype with parameters
@@ -90,7 +90,7 @@ instance (Arbitrary a) => Arbitrary (A a) where
90 shrink = genericShrink
90 shrink = genericShrink
91@
91@
92
92
93−It should work from first glance, but on compilation it will throw an error:
93+It should work from first glance, but when compile it will throw an error:
94
94
95@
95@
96 • Could not deduce (Test.QuickCheck.Arbitrary.Generic.GArbitrary
96 • Could not deduce (Test.QuickCheck.Arbitrary.Generic.GArbitrary
@@ -120,7 +120,7 @@ instance (Arg (A a) a, Arbitrary a) => Arbitrary (A a) where
120 shrink = genericShrink
120 shrink = genericShrink
121@
121@
122
122
123−Now everything compiles.
123+Now everything compiles and works as expected.
124
124
125-}
125-}
126
126