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:
parent
a4e823681f
commit
28eec7a7ec
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user