diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-11-11 15:01:13 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-11-11 15:01:13 -0400 |
commit | 962e279e17c1f3cf3be49ffdfb5e7310711a220c (patch) | |
tree | d9953d9e57dea51c24ccaf4d7e64731010546f4f /Utility/QuickCheck.hs | |
parent | 7d7f93302c72cbe1a16598b0c90a49c10aaf3669 (diff) | |
download | git-repair-962e279e17c1f3cf3be49ffdfb5e7310711a220c.tar.gz |
merge from git-annex
Diffstat (limited to 'Utility/QuickCheck.hs')
-rw-r--r-- | Utility/QuickCheck.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Utility/QuickCheck.hs b/Utility/QuickCheck.hs index cd408dd..0181ea9 100644 --- a/Utility/QuickCheck.hs +++ b/Utility/QuickCheck.hs @@ -6,7 +6,7 @@ -} {-# OPTIONS_GHC -fno-warn-orphans #-} -{-# LANGUAGE TypeSynonymInstances #-} +{-# LANGUAGE TypeSynonymInstances, CPP #-} module Utility.QuickCheck ( module X @@ -16,16 +16,20 @@ module Utility.QuickCheck import Test.QuickCheck as X import Data.Time.Clock.POSIX import System.Posix.Types +#if ! MIN_VERSION_QuickCheck(2,8,2) import qualified Data.Map as M import qualified Data.Set as S +#endif import Control.Applicative import Prelude -instance (Arbitrary k, Arbitrary v, Eq k, Ord k) => Arbitrary (M.Map k v) where +#if ! MIN_VERSION_QuickCheck(2,8,2) +instance (Arbitrary k, Arbitrary v, Ord k) => Arbitrary (M.Map k v) where arbitrary = M.fromList <$> arbitrary -instance (Arbitrary v, Eq v, Ord v) => Arbitrary (S.Set v) where +instance (Arbitrary v, Ord v) => Arbitrary (S.Set v) where arbitrary = S.fromList <$> arbitrary +#endif {- Times before the epoch are excluded. -} instance Arbitrary POSIXTime where |