From 8418a2541296340f6762957e1a4fa1e5121dc5ec Mon Sep 17 00:00:00 2001 From: Sandy Maguire Date: Thu, 12 Mar 2020 16:49:26 -0700 Subject: [PATCH] Fix CI? --- src/Test/QuickCheck/Checkers.hs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Test/QuickCheck/Checkers.hs b/src/Test/QuickCheck/Checkers.hs index 19c2b2b..5d048d3 100644 --- a/src/Test/QuickCheck/Checkers.hs +++ b/src/Test/QuickCheck/Checkers.hs @@ -60,10 +60,13 @@ import Data.Complex import Data.Ord import Data.Proxy import Data.Ratio -import Data.Functor.Compose import Data.Functor.Identity + +#if __GLASGOW_HASKELL__ >= 800 +import Data.Functor.Compose import qualified Data.Functor.Product as F import qualified Data.Functor.Sum as F +#endif import Data.Semigroup import GHC.Generics import System.Random @@ -262,7 +265,9 @@ instance EqProp Any instance EqProp a => EqProp (Sum a) instance EqProp a => EqProp (Product a) instance EqProp (f a) => EqProp (Alt f a) +#if __GLASGOW_HASKELL__ >= 806 instance EqProp (f a) => EqProp (Ap f a) +#endif -- Orderings instance EqProp a => EqProp (Down a) @@ -284,12 +289,14 @@ instance (EqProp a, EqProp b, EqProp c, EqProp d) => EqProp (a,b,c,d) instance (EqProp a, EqProp b) => EqProp (Either a b) -- Functors +#if __GLASGOW_HASKELL__ >= 800 instance EqProp (f (g a)) => EqProp (Compose f g a) +instance (EqProp (f a), EqProp (g a)) => EqProp (F.Sum f g a) +#endif +instance (EqProp (f a), EqProp (g a)) => EqProp (F.Product f g a) instance EqProp a => EqProp (Identity a) instance EqProp a => EqProp (Const a b) instance EqProp (Proxy a) -instance (EqProp (f a), EqProp (g a)) => EqProp (F.Sum f g a) -instance (EqProp (f a), EqProp (g a)) => EqProp (F.Product f g a) -- Function equality instance (Show a, Arbitrary a, EqProp b) => EqProp (a -> b) where