summaryrefslogtreecommitdiff
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
parent7f4dac5f13219c0993b9f927e6e627af69fb4f2d (diff)
Fix build with QuickCheck 2.8.2
It added some instances I had also implemented.
-rw-r--r--Utility/QuickCheck.hs4
-rw-r--r--debian/changelog1
-rw-r--r--doc/bugs/Doesn__39__t_build_with_QuickCheck_2.8.2.mdwn3
3 files changed, 7 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
diff --git a/debian/changelog b/debian/changelog
index 0dfabba64..1b3b0f67c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,7 @@ git-annex (6.20160115) UNRELEASED; urgency=medium
effect.
* assistant: Use udisks2 dbus events to detect when disks are mounted,
instead of relying on gnome/kde stuff that is not stable.
+ * Fix build with QuickCheck 2.8.2
-- Joey Hess <id@joeyh.name> Fri, 15 Jan 2016 14:05:01 -0400
diff --git a/doc/bugs/Doesn__39__t_build_with_QuickCheck_2.8.2.mdwn b/doc/bugs/Doesn__39__t_build_with_QuickCheck_2.8.2.mdwn
index 2a7381e62..9293ee530 100644
--- a/doc/bugs/Doesn__39__t_build_with_QuickCheck_2.8.2.mdwn
+++ b/doc/bugs/Doesn__39__t_build_with_QuickCheck_2.8.2.mdwn
@@ -28,3 +28,6 @@ git-annex 6.20160114, on Arch Linux x86_64.
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
Yes, it built fine with QuickCheck 2.8. I didn't test with 2.8.1, though.
+
+> ifdefed those instances out with this version of quickcheck. [[done]]
+> --[[Joey]]