1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 02:14:20 +03:00

Use an equality constraint to simplify the context of evaluatePackageBody.

This commit is contained in:
Rob Rix 2018-05-01 15:54:20 -04:00
parent 24428f94e9
commit 7eabddf61c

View File

@ -325,12 +325,13 @@ withUnevaluatedModules :: Effectful m => ModuleTable [Module term] -> m (Reader
withUnevaluatedModules = raiseHandler . flip runReader
-- | Evaluate a given package body (module table and entry points).
evaluatePackageBody :: ( Evaluatable (Base term)
, Member (EvalModule term value) (Reader (ModuleTable [Module term]) ': effects)
, Member Fail (Reader (ModuleTable [Module term]) ': effects)
, Member (Reader PackageInfo) (Reader (ModuleTable [Module term]) ': effects)
, MonadAnalysis location term value (Reader (ModuleTable [Module term]) ': effects) m
, MonadEvaluatable location term value (Reader (ModuleTable [Module term]) ': effects) m
evaluatePackageBody :: ( inner ~ (Reader (ModuleTable [Module term]) ': effects)
, Evaluatable (Base term)
, Member (EvalModule term value) inner
, Member Fail inner
, Member (Reader PackageInfo) inner
, MonadAnalysis location term value inner m
, MonadEvaluatable location term value inner m
, Recursive term
)
=> PackageBody term