mirror of
https://github.com/github/semantic.git
synced 2024-12-19 12:51:52 +03:00
🔥 localize.
This commit is contained in:
parent
71dba01c1d
commit
6f89e25628
@ -6,7 +6,6 @@ module Control.Abstract.Environment
|
||||
, modifyEnv
|
||||
, withEnv
|
||||
, localEnv
|
||||
, localize
|
||||
, lookupEnv
|
||||
, Env(..)
|
||||
, runEnv
|
||||
@ -47,10 +46,6 @@ localEnv f a = do
|
||||
result <- a
|
||||
result <$ modifyEnv Env.pop
|
||||
|
||||
-- | Run a computation in a new local environment.
|
||||
localize :: Member (State (Environment location)) effects => Evaluator location value effects a -> Evaluator location value effects a
|
||||
localize = localEnv id
|
||||
|
||||
-- | Look a 'Name' up in the current environment, trying the default environment if no value is found.
|
||||
lookupEnv :: Member (Env location) effects => Name -> Evaluator location value effects (Maybe (Address location value))
|
||||
lookupEnv name = fmap Address <$> send (Lookup name)
|
||||
|
Loading…
Reference in New Issue
Block a user