From 877d6ae000943994d4ea783bcf28541a7055062c Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Wed, 23 Feb 2022 03:16:32 +0100 Subject: [PATCH] Remove redundant constraint from instance CoArbitrary Array (#65) We can do this now that we've dropped support for GHC 7.10 in #63. --- src/Test/QuickCheck/Instances/Array.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Test/QuickCheck/Instances/Array.hs b/src/Test/QuickCheck/Instances/Array.hs index 5ceaadd..4715d5b 100644 --- a/src/Test/QuickCheck/Instances/Array.hs +++ b/src/Test/QuickCheck/Instances/Array.hs @@ -1,19 +1,14 @@ {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -Wall -fno-warn-orphans #-} -#if MIN_VERSION_base(4,9,0) --- https://github.com/conal/checkers/pull/38 -{-# OPTIONS_GHC -Wno-redundant-constraints #-} -#endif module Test.QuickCheck.Instances.Array where import Test.QuickCheck import Data.Array --- The redundant (Ix a) constraint is required with GHC-7.10. instance (Ix a, Integral a, Arbitrary b) => Arbitrary (Array a b) where arbitrary = (\x -> listArray (0,fromIntegral (length x - 1)) x) <$> arbitrary -instance (Ix a, CoArbitrary b) => CoArbitrary (Array a b) where +instance (CoArbitrary b) => CoArbitrary (Array a b) where coarbitrary = coarbitrary . elems