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

Reformat/expand the 📝 for evaluateTerm.

This commit is contained in:
Rob Rix 2018-03-06 16:43:15 -05:00
parent b0b93c7147
commit e0e1dc2e67

View File

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