1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Generalize the MonadFunctionAbstraction instance for Value over the evaluator type.

This commit is contained in:
Rob Rix 2018-03-01 11:32:14 -05:00
parent 77e79737fe
commit c3ee31c4fc

View File

@ -81,11 +81,12 @@ class MonadEvaluator t v m => MonadFunctionAbstraction t v m where
instance ( Evaluatable (Base t)
, FreeVariables t
, MonadAddressable location (Value location t) (Evaluator effects t (Value location t))
, MonadAddressable location (Value location t) m
, MonadEvaluator t (Value location t) m
, Recursive t
, Semigroup (Cell location (Value location t))
)
=> MonadFunctionAbstraction t (Value location t) (Evaluator effects t (Value location t)) where
=> MonadFunctionAbstraction t (Value location t) m where
-- FIXME: Can we store the action evaluating the body in the Value instead of the body term itself
abstract names (Subterm body _) = inj . Closure names body <$> askLocalEnv