summaryrefslogtreecommitdiff
path: root/Utility/QuickCheck.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-24 14:15:00 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-24 14:15:00 -0400
commit07787444da85548689b1272e2bb663a1179a3e12 (patch)
tree2d29ddd217773d47808d957dc9d64ddd4536e2f3 /Utility/QuickCheck.hs
parent7f4dac5f13219c0993b9f927e6e627af69fb4f2d (diff)
Fix build with QuickCheck 2.8.2
It added some instances I had also implemented.
Diffstat (limited to 'Utility/QuickCheck.hs')
-rw-r--r--Utility/QuickCheck.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Utility/QuickCheck.hs b/Utility/QuickCheck.hs
index cd408ddc9..8db03f4cd 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,11 +21,13 @@ 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