on master help sign in
Merge pull request #555 from bos/qc-210
de79f6bAdam Bergmark
aeson.cabal+1−1
@@ -199,7 +199,7 @@ test-suite tests
199
199
200 build-depends:
200 build-depends:
201 HUnit,
201 HUnit,
202− QuickCheck >= 2.8 && <2.9.3,
202+ QuickCheck >= 2.8 && <2.11,
203 aeson,
203 aeson,
204 integer-logarithms >= 1 && <1.1,
204 integer-logarithms >= 1 && <1.1,
205 attoparsec,
205 attoparsec,
tests/Instances.hs+10−5
@@ -14,8 +14,6 @@ import Control.Applicative (empty)
14import Control.Monad
14import Control.Monad
15import Data.Aeson.Types
15import Data.Aeson.Types
16import Data.Function (on)
16import Data.Function (on)
17−import Data.Functor.Compose (Compose (..))
18−import Data.Proxy (Proxy(..))
19import Data.Time (ZonedTime(..), TimeZone(..))
17import Data.Time (ZonedTime(..), TimeZone(..))
20import Data.Time.Clock (UTCTime(..))
18import Data.Time.Clock (UTCTime(..))
21import Functions
19import Functions
@@ -32,6 +30,11 @@ import Data.Version
32import Test.QuickCheck (getNonNegative, listOf1, resize)
30import Test.QuickCheck (getNonNegative, listOf1, resize)
33#endif
31#endif
34
32
33+#if !MIN_VERSION_QuickCheck(2,10,0)
34+import Data.Functor.Compose (Compose (..))
35+import Data.Proxy (Proxy(..))
36+#endif
37+
35import Data.Orphans ()
38import Data.Orphans ()
36import Test.QuickCheck.Instances ()
39import Test.QuickCheck.Instances ()
37#if MIN_VERSION_base(4,7,0)
40#if MIN_VERSION_base(4,7,0)
@@ -188,14 +191,16 @@ instance Arbitrary Natural where
188 arbitrary = fromInteger . abs <$> arbitrary
191 arbitrary = fromInteger . abs <$> arbitrary
189#endif
192#endif
190
193
194+#if !MIN_VERSION_QuickCheck(2,10,0)
191instance Arbitrary (Proxy a) where
195instance Arbitrary (Proxy a) where
192 arbitrary = pure Proxy
196 arbitrary = pure Proxy
193
197
194−instance Arbitrary a => Arbitrary (DList.DList a) where
195− arbitrary = DList.fromList <$> arbitrary
196−
197instance Arbitrary (f (g a)) => Arbitrary (Compose f g a) where
198instance Arbitrary (f (g a)) => Arbitrary (Compose f g a) where
198 arbitrary = Compose <$> arbitrary
199 arbitrary = Compose <$> arbitrary
200+#endif
201+
202+instance Arbitrary a => Arbitrary (DList.DList a) where
203+ arbitrary = DList.fromList <$> arbitrary
199
204
200#if !MIN_VERSION_QuickCheck(2,9,0)
205#if !MIN_VERSION_QuickCheck(2,9,0)
201instance Arbitrary a => Arbitrary (Const a b) where
206instance Arbitrary a => Arbitrary (Const a b) where