From 82bceec65811118d2c90280df3dd661ea506da99 Mon Sep 17 00:00:00 2001 From: Patrick Thomson Date: Fri, 23 Mar 2018 14:44:17 -0400 Subject: [PATCH] fix some comments --- src/Analysis/Abstract/Evaluating.hs | 2 +- src/Control/Abstract/Evaluator.hs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Analysis/Abstract/Evaluating.hs b/src/Analysis/Abstract/Evaluating.hs index c8146b289..fbab7234d 100644 --- a/src/Analysis/Abstract/Evaluating.hs +++ b/src/Analysis/Abstract/Evaluating.hs @@ -169,7 +169,7 @@ type EvaluatingEffects term value , State (EnvironmentFor value) -- Environments (both local and global) , State (HeapFor value) -- The heap , Reader (ModuleTable [term]) -- Cache of unevaluated modules - , Reader (EnvironmentFor value) -- Default environment used by evaluateModule + , Reader (EnvironmentFor value) -- Default environment used as a fallback in lookupEnv , State (ModuleTable (EnvironmentFor value, value)) -- Cache of evaluated modules , State (ExportsFor value) -- Exports (used to filter environments when they are imported) , State (IntMap.IntMap term) -- For jumps diff --git a/src/Control/Abstract/Evaluator.hs b/src/Control/Abstract/Evaluator.hs index 422e2066b..ad6045afc 100644 --- a/src/Control/Abstract/Evaluator.hs +++ b/src/Control/Abstract/Evaluator.hs @@ -56,7 +56,8 @@ class Monad m => MonadEnvironment value m | m -> value where -- | Retrieve the default environment. defaultEnvironment :: m (EnvironmentFor value) - -- | Set the default environment for the lifetime of an action + -- | Set the default environment for the lifetime of an action. + -- Usually only invoked in a top-level evaluation function. withDefaultEnvironment :: EnvironmentFor value -> m a -> m a -- | Get the global export state.