From 137b26d2035e7dfa6d0b33bcae6b05c2e7445c77 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 2 May 2017 11:31:37 -0400 Subject: [PATCH] Define addition expression syntax. --- src/Data/Syntax/Expression.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Data/Syntax/Expression.hs b/src/Data/Syntax/Expression.hs index aa9a2c031..e10a8e82f 100644 --- a/src/Data/Syntax/Expression.hs +++ b/src/Data/Syntax/Expression.hs @@ -19,3 +19,11 @@ data Not a = Not a instance Eq1 Not where liftEq = genericLiftEq instance Show1 Not where liftShowsPrec = genericLiftShowsPrec + + +-- | Binary addition. +data Plus a = Plus a a + deriving (Eq, Foldable, Functor, Generic1, Show, Traversable) + +instance Eq1 Plus where liftEq = genericLiftEq +instance Show1 Plus where liftShowsPrec = genericLiftShowsPrec