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

Simplify an instance context.

This commit is contained in:
Rob Rix 2018-03-23 20:25:13 -04:00
parent 4231844a29
commit 72de7d0bbd
2 changed files with 3 additions and 10 deletions

View File

@ -68,11 +68,12 @@ evaluateTerm = foldSubterms (analyzeTerm eval)
type MonadEvaluatable term value m =
( Evaluatable (Base term)
, FreeVariables term
, Monad m
, MonadAddressable (LocationFor value) value m
, MonadAnalysis term value m
, MonadThrow Prelude.String value m
, MonadValue value m
, Show (LocationFor value)
, MonadThrow Prelude.String value m
)
class Evaluatable constr where

View File

@ -153,15 +153,7 @@ instance ValueRoots Value where
-- | Construct a 'Value' wrapping the value arguments (if any).
instance ( Evaluatable (Base term)
, FreeVariables term
, Monad m
, MonadAddressable Precise Value m
, MonadEvaluateModule term Value m
, MonadValue Value m
, MonadThrow Prelude.String Value m
)
=> MonadValue Value m where
instance MonadEvaluatable term Value m => MonadValue Value m where
unit = pure . injValue $ Unit
integer = pure . injValue . Data.Abstract.Value.Integer . Number.Integer