From 636e096aab2a60d6351ccb6907b5adc7f4a0c4f4 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 21 Feb 2017 16:20:43 -0500 Subject: [PATCH] Define a GEq1 instance for :.: with GEq1 fields. --- src/Data/Functor/Classes/Eq/Generic.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Data/Functor/Classes/Eq/Generic.hs b/src/Data/Functor/Classes/Eq/Generic.hs index 02ccff00b..4a82f5fb0 100644 --- a/src/Data/Functor/Classes/Eq/Generic.hs +++ b/src/Data/Functor/Classes/Eq/Generic.hs @@ -43,3 +43,6 @@ instance (GEq1 f, GEq1 g) => GEq1 (f :+: g) where instance (GEq1 f, GEq1 g) => GEq1 (f :*: g) where gliftEq f (a1 :*: b1) (a2 :*: b2) = gliftEq f a1 a2 && gliftEq f b1 b2 + +instance (GEq1 f, GEq1 g) => GEq1 (f :.: g) where + gliftEq f (Comp1 a) (Comp1 b) = gliftEq (gliftEq f) a b