mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Simplify an instance context.
This commit is contained in:
parent
4231844a29
commit
72de7d0bbd
@ -68,11 +68,12 @@ evaluateTerm = foldSubterms (analyzeTerm eval)
|
|||||||
type MonadEvaluatable term value m =
|
type MonadEvaluatable term value m =
|
||||||
( Evaluatable (Base term)
|
( Evaluatable (Base term)
|
||||||
, FreeVariables term
|
, FreeVariables term
|
||||||
|
, Monad m
|
||||||
, MonadAddressable (LocationFor value) value m
|
, MonadAddressable (LocationFor value) value m
|
||||||
, MonadAnalysis term value m
|
, MonadAnalysis term value m
|
||||||
|
, MonadThrow Prelude.String value m
|
||||||
, MonadValue value m
|
, MonadValue value m
|
||||||
, Show (LocationFor value)
|
, Show (LocationFor value)
|
||||||
, MonadThrow Prelude.String value m
|
|
||||||
)
|
)
|
||||||
|
|
||||||
class Evaluatable constr where
|
class Evaluatable constr where
|
||||||
|
@ -153,15 +153,7 @@ instance ValueRoots Value where
|
|||||||
|
|
||||||
|
|
||||||
-- | Construct a 'Value' wrapping the value arguments (if any).
|
-- | Construct a 'Value' wrapping the value arguments (if any).
|
||||||
instance ( Evaluatable (Base term)
|
instance MonadEvaluatable term Value m => MonadValue Value m where
|
||||||
, FreeVariables term
|
|
||||||
, Monad m
|
|
||||||
, MonadAddressable Precise Value m
|
|
||||||
, MonadEvaluateModule term Value m
|
|
||||||
, MonadValue Value m
|
|
||||||
, MonadThrow Prelude.String Value m
|
|
||||||
)
|
|
||||||
=> MonadValue Value m where
|
|
||||||
|
|
||||||
unit = pure . injValue $ Unit
|
unit = pure . injValue $ Unit
|
||||||
integer = pure . injValue . Data.Abstract.Value.Integer . Number.Integer
|
integer = pure . injValue . Data.Abstract.Value.Integer . Number.Integer
|
||||||
|
Loading…
Reference in New Issue
Block a user