From 8fca2b5ab54f284d1edbbb92017dd67e1f1ca0ae Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 30 May 2018 12:50:51 -0400 Subject: [PATCH] pairValueWithEnv acts in State, not Env. --- src/Data/Abstract/Evaluatable.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Abstract/Evaluatable.hs b/src/Data/Abstract/Evaluatable.hs index f591a79bb..bb7d52b03 100644 --- a/src/Data/Abstract/Evaluatable.hs +++ b/src/Data/Abstract/Evaluatable.hs @@ -85,7 +85,7 @@ evaluatePackageWith :: forall address term value inner inner' inner'' outer , Member Fresh outer , Member (Resumable (AddressError address value)) outer , Member (Resumable (LoadError address value)) outer - , Member (Env address) outer + , Member (State (Environment address)) outer , Member (State (Exports address)) outer , Member (State (Heap address (Cell address) value)) outer , Member (State (ModuleTable (Maybe (Environment address, value)))) outer @@ -143,7 +143,7 @@ evaluatePackageWith analyzeModule analyzeTerm package filterEnv ports env | Exports.null ports = env | otherwise = Exports.toEnvironment ports `mergeEnvs` overwrite (Exports.aliases ports) env - pairValueWithEnv action = flip (,) <$> action <*> (filterEnv <$> TermEvaluator getExports <*> TermEvaluator getEnv) + pairValueWithEnv action = flip (,) <$> action <*> (filterEnv <$> TermEvaluator getExports <*> TermEvaluator (get @(Environment address))) -- | Isolate the given action with an empty global environment and exports.