diff --git a/src/Control/Abstract/Analysis.hs b/src/Control/Abstract/Analysis.hs index f5cc97f50..6e5780440 100644 --- a/src/Control/Abstract/Analysis.hs +++ b/src/Control/Abstract/Analysis.hs @@ -9,7 +9,9 @@ import Prologue class Monad m => MonadAnalysis term value m | m -> term, m -> value where 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. + -- | Evaluate a term to a value using the semantics of the current analysis. + -- + -- This should always be called instead of explicitly folding either 'eval' or 'analyzeTerm' 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