on master help sign in
Merge branch '0.11.x' of github.com:bos/aeson into 0.11.x
6363072Adam Bergmark
aeson.cabal+1−1
@@ -149,7 +149,7 @@ test-suite tests
149
149
150 build-depends:
150 build-depends:
151 HUnit,
151 HUnit,
152− QuickCheck >= 2.7 && <2.8.3,
152+ QuickCheck >= 2.7 && <2.10,
153 aeson,
153 aeson,
154 attoparsec,
154 attoparsec,
155 base,
155 base,
tests/Instances.hs+5−3
@@ -142,12 +142,17 @@ instance ApproxEq Char where
142instance (ApproxEq a) => ApproxEq [a] where
142instance (ApproxEq a) => ApproxEq [a] where
143 a =~ b = length a == length b && all (uncurry (=~)) (zip a b)
143 a =~ b = length a == length b && all (uncurry (=~)) (zip a b)
144
144
145+#if !MIN_VERSION_QuickCheck(2,9,0)
145instance Arbitrary Version where
146instance Arbitrary Version where
146 arbitrary = makeVersion . fmap getNonNegative <$> resize 4 (listOf1 arbitrary)
147 arbitrary = makeVersion . fmap getNonNegative <$> resize 4 (listOf1 arbitrary)
147
148
148instance Arbitrary a => Arbitrary (NonEmpty a) where
149instance Arbitrary a => Arbitrary (NonEmpty a) where
149 arbitrary = (:|) <$> arbitrary <*> arbitrary
150 arbitrary = (:|) <$> arbitrary <*> arbitrary
150
151
152+instance Arbitrary a => Arbitrary (Const a b) where
153+ arbitrary = Const <$> arbitrary
154+#endif
155+
151-- Version tags are deprecated, so we avoid using them in the Arbitrary
156-- Version tags are deprecated, so we avoid using them in the Arbitrary
152-- instance. However, the recommended constructor 'makeVersion' is not
157-- instance. However, the recommended constructor 'makeVersion' is not
153-- exported by "Data.Version" until base-4.8.0.0. For previous versions,
158-- exported by "Data.Version" until base-4.8.0.0. For previous versions,
@@ -168,6 +173,3 @@ instance Arbitrary (Proxy a) where
168
173
169instance Arbitrary b => Arbitrary (Tagged a b) where
174instance Arbitrary b => Arbitrary (Tagged a b) where
170 arbitrary = Tagged <$> arbitrary
175 arbitrary = Tagged <$> arbitrary
171−
172−instance Arbitrary a => Arbitrary (Const a b) where
173− arbitrary = Const <$> arbitrary