git.iko.soy/typeable/bloodhound
on master help sign in
CPP the Arbitrary instance for the 7.8 users
1467ffeChris Allen
bloodhound.cabal+1−1
@@ -67,7 +67,7 @@ test-suite tests
67 time,
67 time,
68 aeson,
68 aeson,
69 semigroups,
69 semigroups,
70− QuickCheck >= 2.8,
70+ QuickCheck,
71 vector,
71 vector,
72 unordered-containers >= 0.2.5.0 && <0.3,
72 unordered-containers >= 0.2.5.0 && <0.3,
73 mtl,
73 mtl,
stack-7.8.yaml−1
@@ -9,7 +9,6 @@ extra-deps:
9- http-types-0.9
9- http-types-0.9
10- http-client-0.5.0
10- http-client-0.5.0
11- attoparsec-0.13.0.1
11- attoparsec-0.13.0.1
12−- QuickCheck-2.8.2
13- doctest-0.10.1
12- doctest-0.10.1
14- doctest-prop-0.2.0.1
13- doctest-prop-0.2.0.1
15- quickcheck-properties-0.1
14- quickcheck-properties-0.1
tests/tests.hs+6
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
1{-# LANGUAGE DefaultSignatures #-}
2{-# LANGUAGE DefaultSignatures #-}
2{-# LANGUAGE DeriveGeneric #-}
3{-# LANGUAGE DeriveGeneric #-}
3{-# LANGUAGE FlexibleContexts #-}
4{-# LANGUAGE FlexibleContexts #-}
@@ -585,6 +586,11 @@ noDuplicates xs = nub xs == xs
585instance Arbitrary NominalDiffTime where
586instance Arbitrary NominalDiffTime where
586 arbitrary = fromInteger <$> arbitrary
587 arbitrary = fromInteger <$> arbitrary
587
588
589+#if !MIN_VERSION_QuickCheck(2,8,0)
590+instance (Arbitrary k, Ord k, Arbitrary v) => Arbitrary (M.Map k v) where
591+ arbitrary = M.fromList <$> arbitrary
592+#endif
593+
588instance Arbitrary Text where
594instance Arbitrary Text where
589 arbitrary = T.pack <$> arbitrary
595 arbitrary = T.pack <$> arbitrary
590
596