From 5166900702d192406b830a2725a6f53de81fbabd Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 6 Apr 2017 10:39:22 -0400 Subject: [PATCH] Define an Eq1 instance for Comment. --- src/Data/Syntax/Comment.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Data/Syntax/Comment.hs b/src/Data/Syntax/Comment.hs index 5e4e4f9a9..3dd32adb9 100644 --- a/src/Data/Syntax/Comment.hs +++ b/src/Data/Syntax/Comment.hs @@ -1,10 +1,14 @@ module Data.Syntax.Comment where +import Data.Functor.Classes.Eq.Generic +import GHC.Generics import Prologue -- | An unnested comment (line or block). newtype Comment a = Comment { commentContent :: ByteString } - deriving (Eq, Show) + deriving (Eq, Generic1, Show) + +instance Eq1 Comment where liftEq = genericLiftEq -- TODO: nested comment types -- TODO: documentation comment types