1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Break the dependency of MonadAnalysis on MonadFunction.

This commit is contained in:
Rob Rix 2018-03-01 15:00:26 -05:00
parent f8fea56c6f
commit 8f446cbd60

View File

@ -78,14 +78,13 @@ class Monad m => MonadAnalysis term value m where
evaluateTerm :: ( AbstractValue value
, FreeVariables term
, MonadAddressable (LocationFor value) value m
, MonadFunction term value m
, Ord (LocationFor value)
, Semigroup (Cell (LocationFor value) value)
)
=> term
-> m value
instance (Recursive t, Evaluatable (Base t)) => MonadAnalysis t v (Evaluator es t v) where
instance (Recursive t, Evaluatable (Base t), MonadFunction t v (Evaluator es t v)) => MonadAnalysis t v (Evaluator es t v) where
evaluateTerm = foldSubterms eval
-- FIXME: this should live in Control.Abstract.Function once it doesnt need to reference Evaluatable.