1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00

Move the Recursive constraint into the MonadEvaluatable synonym.

This commit is contained in:
Rob Rix 2018-03-23 20:38:47 -04:00
parent b94098cf3e
commit ca9476000b
3 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)
)