From b364c6637a6f2ab62b7efaf624c1a3ab82d52b1d Mon Sep 17 00:00:00 2001 From: Charlie Somerville Date: Tue, 24 Jul 2018 16:23:44 +1000 Subject: [PATCH] implement the right type classes for This --- src/Data/Syntax/Expression.hs | 2 +- test/Data/Functor/Listable.hs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Data/Syntax/Expression.hs b/src/Data/Syntax/Expression.hs index 6dd2be07a..0122c7d29 100644 --- a/src/Data/Syntax/Expression.hs +++ b/src/Data/Syntax/Expression.hs @@ -496,7 +496,7 @@ instance Show1 Super where liftShowsPrec = genericLiftShowsPrec instance Evaluatable Super data This a = This - deriving (Diffable, Eq, Foldable, Functor, Generic1, Ord, Show, Traversable, FreeVariables1, Declarations1, ToJSONFields1, Hashable1) + deriving (Diffable, Eq, Foldable, Functor, Generic1, Ord, Show, Traversable, FreeVariables1, Declarations1, ToJSONFields1, Hashable1, Named1, Message1) instance Eq1 This where liftEq = genericLiftEq instance Ord1 This where liftCompare = genericLiftCompare diff --git a/test/Data/Functor/Listable.hs b/test/Data/Functor/Listable.hs index 1cbef66fe..79b9b4c89 100644 --- a/test/Data/Functor/Listable.hs +++ b/test/Data/Functor/Listable.hs @@ -395,6 +395,9 @@ instance Listable1 Expression.Subscript where instance Listable1 Expression.Member where liftTiers tiers = liftCons2 tiers tiers Expression.Member +instance Listable1 Expression.This where + liftTiers tiers = cons0 Expression.This + instance Listable1 Literal.Complex where liftTiers tiers = cons1 Literal.Complex