summaryrefslogtreecommitdiff
path: root/Utility/QuickCheck.hs
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-01-01 20:50:07 +0000
committerSean Whitton <spwhitton@spwhitton.name>2020-01-01 20:50:07 +0000
commit5a086f664e9efbb25acb0652dc0e10adede61c2e (patch)
tree405ba59aec2689cc0616a2afcc211e4aedf11c06 /Utility/QuickCheck.hs
parenta332433aac213fdece32f9a9e5b5749853770abf (diff)
parenta359c2841a68bb7fe6182fddc8e84abb7a463040 (diff)
downloadgit-repair-5a086f664e9efbb25acb0652dc0e10adede61c2e.tar.gz
Merge remote-tracking branch 'dgit/dgit/sid'
Diffstat (limited to 'Utility/QuickCheck.hs')
-rw-r--r--Utility/QuickCheck.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Utility/QuickCheck.hs b/Utility/QuickCheck.hs
index cd408dd..2009476 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
@@ -21,19 +21,18 @@ import qualified Data.Set as S
import Control.Applicative
import Prelude
+#if ! MIN_VERSION_QuickCheck(2,8,2)
instance (Arbitrary k, Arbitrary v, Eq k, Ord k) => Arbitrary (M.Map k v) where
arbitrary = M.fromList <$> arbitrary
instance (Arbitrary v, Eq v, Ord v) => Arbitrary (S.Set v) where
arbitrary = S.fromList <$> arbitrary
+#endif
{- Times before the epoch are excluded. -}
instance Arbitrary POSIXTime where
arbitrary = fromInteger <$> nonNegative arbitrarySizedIntegral
-instance Arbitrary EpochTime where
- arbitrary = fromInteger <$> nonNegative arbitrarySizedIntegral
-
{- Pids are never negative, or 0. -}
instance Arbitrary ProcessID where
arbitrary = arbitrarySizedBoundedIntegral `suchThat` (> 0)