From deaaa80a521d4b4f07a2e748cf666b4caad1c10b Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 30 May 2018 17:17:01 -0400 Subject: [PATCH] Rename runEnvState to runEnv. --- src/Control/Abstract/Environment.hs | 10 +++++----- src/Data/Abstract/Evaluatable.hs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Control/Abstract/Environment.hs b/src/Control/Abstract/Environment.hs index 8cd7dc206..551d6054a 100644 --- a/src/Control/Abstract/Environment.hs +++ b/src/Control/Abstract/Environment.hs @@ -10,7 +10,7 @@ module Control.Abstract.Environment , locally , close , Env(..) -, runEnvState +, runEnv , EnvironmentError(..) , freeVariableError , runEnvironmentError @@ -80,10 +80,10 @@ handleEnv = \case GetEnv -> get Export name alias addr -> modify (Exports.insert name alias addr) -runEnvState :: Environment address - -> Evaluator address value (Env address ': effects) a - -> Evaluator address value effects (a, Environment address) -runEnvState initial = fmap (uncurry filterEnv) . runState lowerBound . runState initial . reinterpret2 handleEnv +runEnv :: Environment address + -> Evaluator address value (Env address ': effects) a + -> Evaluator address value effects (a, Environment address) +runEnv initial = fmap (uncurry filterEnv) . runState lowerBound . runState initial . reinterpret2 handleEnv where -- TODO: If the set of exports is empty because no exports have been -- defined, do we export all terms, or no terms? This behavior varies across -- languages. We need better semantics rather than doing it ad-hoc. diff --git a/src/Data/Abstract/Evaluatable.hs b/src/Data/Abstract/Evaluatable.hs index 6e55cd876..3cfbb174e 100644 --- a/src/Data/Abstract/Evaluatable.hs +++ b/src/Data/Abstract/Evaluatable.hs @@ -112,7 +112,7 @@ evaluatePackageWith analyzeModule analyzeTerm package runInModule preludeEnv info = runReader info . raiseHandler runAllocator - . raiseHandler (runEnvState preludeEnv) + . raiseHandler (runEnv preludeEnv) . raiseHandler runReturn . raiseHandler runLoopControl