From 28eec7a7ecc76d4a6508a8bbc89f6f07be868b9d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 7 May 2018 15:19:57 -0400 Subject: [PATCH] Lift TermEvaluators to Subterm evaluators. --- test/Control/Abstract/Evaluator/Spec.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/Control/Abstract/Evaluator/Spec.hs b/test/Control/Abstract/Evaluator/Spec.hs index a5e4fb7e7..82b8ec0f9 100644 --- a/test/Control/Abstract/Evaluator/Spec.hs +++ b/test/Control/Abstract/Evaluator/Spec.hs @@ -7,6 +7,7 @@ import Data.Abstract.Module import qualified Data.Abstract.Number as Number import Data.Abstract.Package import qualified Data.Abstract.Value as Value +import Data.Algebra import SpecHelpers hiding (Term) spec :: Spec @@ -31,6 +32,9 @@ runValue = runEvalClosure (runValue . runTerm) . runReturn . runLoopControl constrainTerm :: Evaluator location Term value effects a -> Evaluator location Term value effects a constrainTerm = id +term :: TermEvaluator Value -> Subterm Term (TermEvaluator Value) +term eval = Subterm (Term eval) eval + type TermEffects = '[ LoopControl Value , Return Value