mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Define local modification to the environment.
This commit is contained in:
parent
55a2b3f8dc
commit
6ad1d024f2
@ -21,6 +21,9 @@ modifyGlobalEnv f = Evaluator (modify f)
|
||||
askLocalEnv :: Evaluator effects value (EnvironmentFor value)
|
||||
askLocalEnv = Evaluator ask
|
||||
|
||||
localEnv :: (EnvironmentFor value -> EnvironmentFor value) -> Evaluator effects value a -> Evaluator effects value a
|
||||
localEnv f a = Evaluator (local f (runEvaluator a))
|
||||
|
||||
|
||||
data Evaluator effects value a
|
||||
= Evaluator
|
||||
|
Loading…
Reference in New Issue
Block a user