From 8093a2b5d4d6e71618633a0174fb85640ff4e6ed Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 21 Feb 2017 16:16:08 -0500 Subject: [PATCH] Define a GEq1 instance for Rec1 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 643f8f303..3a290a829 100644 --- a/src/Data/Functor/Classes/Eq/Generic.hs +++ b/src/Data/Functor/Classes/Eq/Generic.hs @@ -27,3 +27,6 @@ instance GEq1 Par1 where instance Eq c => GEq1 (K1 i c) where gliftEq _ (K1 a) (K1 b) = a == b + +instance GEq1 f => GEq1 (Rec1 f) where + gliftEq f (Rec1 a) (Rec1 b) = gliftEq f a b