1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

Rename runEnvState to runEnv.

This commit is contained in:
Rob Rix 2018-05-30 17:17:01 -04:00
parent bf35d9db79
commit deaaa80a52
2 changed files with 6 additions and 6 deletions

View File

@ -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.

View File

@ -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