1
1
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:
Rob Rix 2018-03-07 21:19:05 -05:00
parent 8551034a1b
commit 271f3fb786
2 changed files with 2 additions and 1 deletions

View File

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

View File

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