From 7eabddf61c9caaff593bb06a88c4e6ef5436b769 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 1 May 2018 15:54:20 -0400 Subject: [PATCH] Use an equality constraint to simplify the context of evaluatePackageBody. --- src/Data/Abstract/Evaluatable.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Data/Abstract/Evaluatable.hs b/src/Data/Abstract/Evaluatable.hs index 4e0d1f3a4..e06a6114f 100644 --- a/src/Data/Abstract/Evaluatable.hs +++ b/src/Data/Abstract/Evaluatable.hs @@ -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