1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Lift TermEvaluators to Subterm evaluators.

This commit is contained in:
Rob Rix 2018-05-07 15:19:57 -04:00
parent a4e823681f
commit 28eec7a7ec

View File

@ -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