mirror of
https://github.com/github/semantic.git
synced 2024-12-19 12:51:52 +03:00
Move the Recursive constraint into the MonadEvaluatable synonym.
This commit is contained in:
parent
b94098cf3e
commit
ca9476000b
@ -44,6 +44,7 @@ instance ( Corecursive term
|
||||
, Member (State (Dead term)) effects
|
||||
, MonadAnalysis term value (m term value effects)
|
||||
, Ord term
|
||||
, Recursive term
|
||||
)
|
||||
=> MonadAnalysis term value (DeadCode m term value effects) where
|
||||
type RequiredEffects term value (DeadCode m term value effects) = State (Dead term) ': RequiredEffects term value (m term value effects)
|
||||
|
@ -79,7 +79,6 @@ instance Members (EvaluatingEffects term value) effects => MonadEvaluator term v
|
||||
|
||||
instance ( Members (EvaluatingEffects term value) effects
|
||||
, MonadValue value (Evaluating term value effects)
|
||||
, Recursive term
|
||||
)
|
||||
=> MonadAnalysis term value (Evaluating term value effects) where
|
||||
type RequiredEffects term value (Evaluating term value effects) = EvaluatingEffects term value
|
||||
|
@ -38,7 +38,7 @@ import Prologue
|
||||
-- | A 'Monad' in which one can evaluate some specific term type to some specific value type.
|
||||
--
|
||||
-- This typeclass is left intentionally unconstrained to avoid circular dependencies between it and other typeclasses.
|
||||
class (MonadEvaluator term value m, Recursive term) => MonadAnalysis term value m where
|
||||
class MonadEvaluator term value m => MonadAnalysis term value m where
|
||||
-- | The effects necessary to run the analysis. Analyses which are composed on top of (wrap) other analyses should include the inner analyses 'RequiredEffects' in their own list.
|
||||
type family RequiredEffects term value m :: [* -> *]
|
||||
|
||||
@ -68,6 +68,7 @@ type MonadEvaluatable term value m =
|
||||
, MonadAnalysis term value m
|
||||
, MonadThrow Prelude.String value m
|
||||
, MonadValue value m
|
||||
, Recursive term
|
||||
, Show (LocationFor value)
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user