From e833ad4feffe55f0c0e1c3760a339ecf4566a284 Mon Sep 17 00:00:00 2001 From: Ayman Nadeem Date: Thu, 9 Aug 2018 12:59:29 -0400 Subject: [PATCH] add eval instance for sequence expression --- src/Data/Syntax/Expression.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Data/Syntax/Expression.hs b/src/Data/Syntax/Expression.hs index dd4c8c2f1..22cd317c3 100644 --- a/src/Data/Syntax/Expression.hs +++ b/src/Data/Syntax/Expression.hs @@ -284,7 +284,9 @@ instance Ord1 SequenceExpression where liftCompare = genericLiftCompare instance Show1 SequenceExpression where liftShowsPrec = genericLiftShowsPrec -- TODO: Implement Eval instance for SequenceExpression -instance Evaluatable SequenceExpression +instance Evaluatable SequenceExpression where + eval (SequenceExpression a b) = + subtermValue a >> subtermRef b -- | Javascript void operator