1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

Move the 📝 for evaluateTerm down.

This commit is contained in:
Rob Rix 2018-03-06 16:40:49 -05:00
parent 25e5af382e
commit b0b93c7147

View File

@ -7,9 +7,9 @@ import Prologue
--
-- This typeclass is left intentionally unconstrained to avoid circular dependencies between it and other typeclasses.
class Monad m => MonadAnalysis term value m | m -> term, m -> value where
-- | Evaluate a term to a value using the semantics of the current analysis. This should always be used instead of explicitly folding 'eval' over subterms, except in 'MonadAnalysis' instances themselves.
analyzeTerm :: SubtermAlgebra (Base term) term (m value)
-- | Evaluate a term to a value using the semantics of the current analysis. This should always be used instead of explicitly folding 'eval' over subterms, except in 'MonadAnalysis' instances themselves.
evaluateTerm :: MonadAnalysis term value m => term -> m value
default evaluateTerm :: (MonadAnalysis term value m, Recursive term) => term -> m value
evaluateTerm = foldSubterms analyzeTerm