@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-# LANGUAGE PackageImports #-}
23module Data.Swagger.Schema.ValidationSpec where
34
@@ -79,18 +80,20 @@ spec = do
7980main :: IO ()
8081main = hspec spec
8182
82−
83+#if MIN_VERSION_QuickCheck(2,8,2)
84+#else
8385instance (Ord k, Arbitrary k, Arbitrary v) => Arbitrary (Map k v) where
8486 arbitrary = Map.fromList <$> arbitrary
8587
86−instance (Eq k, Hashable k, Arbitrary k, Arbitrary v) => Arbitrary (HashMap k v) where
87− arbitrary = HashMap.fromList <$> arbitrary
88−
8988instance Arbitrary a => Arbitrary (IntMap a) where
9089 arbitrary = IntMap.fromList <$> arbitrary
9190
9291instance (Ord a, Arbitrary a) => Arbitrary (Set a) where
9392 arbitrary = Set.fromList <$> arbitrary
93+#endif
94+
95+instance (Eq k, Hashable k, Arbitrary k, Arbitrary v) => Arbitrary (HashMap k v) where
96+ arbitrary = HashMap.fromList <$> arbitrary
9497
9598instance (Eq a, Hashable a, Arbitrary a) => Arbitrary (HashSet a) where
9699 arbitrary = HashSet.fromList <$> arbitrary