mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
MonadAnalysis implies MonadEvaluator.
This commit is contained in:
parent
8551034a1b
commit
271f3fb786
@ -54,6 +54,7 @@ deriving instance (Member Fail effects, MonadEvaluator (Evaluator term value eff
|
||||
|
||||
instance ( Evaluatable (Base term)
|
||||
, FreeVariables term
|
||||
, Members (EvaluatorEffects term value) effects
|
||||
, MonadAddressable (LocationFor value) (Evaluation term value effects)
|
||||
, MonadValue value (Evaluation term value effects)
|
||||
, Recursive term
|
||||
|
@ -18,7 +18,7 @@ import Prologue
|
||||
-- | A 'Monad' in which one can evaluate some specific term type to some specific value type.
|
||||
--
|
||||
-- This typeclass is left intentionally unconstrained to avoid circular dependencies between it and other typeclasses.
|
||||
class Monad m => MonadAnalysis m where
|
||||
class MonadEvaluator m => MonadAnalysis m where
|
||||
-- | Analyze a term using the semantics of the current analysis. This should generally only be called by definitions of 'evaluateTerm' and 'analyzeTerm' in this or other instances.
|
||||
analyzeTerm :: SubtermAlgebra (Base (TermFor m)) (TermFor m) (m (ValueFor m))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user