From b8bd18e7420d0b7b44f0b473c76d4e078c2057b6 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 3 May 2017 11:26:53 -0400 Subject: [PATCH] Define binary subtraction syntax. --- src/Data/Syntax/Expression.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Data/Syntax/Expression.hs b/src/Data/Syntax/Expression.hs index e10a8e82f..f44aa8e6b 100644 --- a/src/Data/Syntax/Expression.hs +++ b/src/Data/Syntax/Expression.hs @@ -27,3 +27,10 @@ data Plus a = Plus a a instance Eq1 Plus where liftEq = genericLiftEq instance Show1 Plus where liftShowsPrec = genericLiftShowsPrec + +-- | Binary subtraction. +data Minus a = Minus a a + deriving (Eq, Foldable, Functor, Generic1, Show, Traversable) + +instance Eq1 Minus where liftEq = genericLiftEq +instance Show1 Minus where liftShowsPrec = genericLiftShowsPrec