QuickCheck version 2.8.2 newly introduced an Arbitrary instance
for Maps. As this instance was not present in earlier versions
of QuickCheck, we have it in our TestCommon module as well. Make
this definition depended on an older version of QuickCheck being
used, to avoid duplicate (albeit equivalent) instance declarations.

Signed-off-by: Klaus Aehlig <[email protected]>
---
 test/hs/Test/Ganeti/TestCommon.hs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/hs/Test/Ganeti/TestCommon.hs 
b/test/hs/Test/Ganeti/TestCommon.hs
index 43595df..2a6b977 100644
--- a/test/hs/Test/Ganeti/TestCommon.hs
+++ b/test/hs/Test/Ganeti/TestCommon.hs
@@ -124,11 +124,13 @@ import Ganeti.JSON (ArrayObject(..))
 import Ganeti.Types
 import Ganeti.Utils.Monad (unfoldrM)
 
+#if !MIN_VERSION_QuickCheck(2,8,2)
 -- * Arbitrary orphan instances
 
 instance (Ord k, Arbitrary k, Arbitrary a) => Arbitrary (M.Map k a) where
   arbitrary = M.fromList <$> arbitrary
   shrink m = M.fromList <$> shrink (M.toList m)
+#endif
 
 
 -- * Constants
-- 
2.7.0.rc3.207.g0ac5344

Reply via email to