mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
Rename runEnvState to runEnv.
This commit is contained in:
parent
bf35d9db79
commit
deaaa80a52
@ -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
|
||||
runEnv :: 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 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.
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user