mirror of
https://github.com/typeable/bloodhound.git
synced 2024-09-19 20:57:26 +03:00
CPP the Arbitrary instance for the 7.8 users
This commit is contained in:
parent
8cff5d4488
commit
1467ffee92
@ -67,7 +67,7 @@ test-suite tests
|
||||
time,
|
||||
aeson,
|
||||
semigroups,
|
||||
QuickCheck >= 2.8,
|
||||
QuickCheck,
|
||||
vector,
|
||||
unordered-containers >= 0.2.5.0 && <0.3,
|
||||
mtl,
|
||||
|
@ -9,7 +9,6 @@ extra-deps:
|
||||
- http-types-0.9
|
||||
- http-client-0.5.0
|
||||
- attoparsec-0.13.0.1
|
||||
- QuickCheck-2.8.2
|
||||
- doctest-0.10.1
|
||||
- doctest-prop-0.2.0.1
|
||||
- quickcheck-properties-0.1
|
||||
|
@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DefaultSignatures #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
@ -585,6 +586,11 @@ noDuplicates xs = nub xs == xs
|
||||
instance Arbitrary NominalDiffTime where
|
||||
arbitrary = fromInteger <$> arbitrary
|
||||
|
||||
#if !MIN_VERSION_QuickCheck(2,8,0)
|
||||
instance (Arbitrary k, Ord k, Arbitrary v) => Arbitrary (M.Map k v) where
|
||||
arbitrary = M.fromList <$> arbitrary
|
||||
#endif
|
||||
|
||||
instance Arbitrary Text where
|
||||
arbitrary = T.pack <$> arbitrary
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user