1
1
mirror of https://github.com/github/semantic.git synced 2024-12-28 09:21:35 +03:00

🔥 putEnv.

This commit is contained in:
Rob Rix 2018-05-30 14:08:57 -04:00
parent 10d9454895
commit 19d4ebefa4
2 changed files with 0 additions and 8 deletions

View File

@ -94,7 +94,6 @@ convergingModules recur m = do
c <- getConfiguration (subterm (moduleBody m))
-- Convergence here is predicated upon an Eq instance, not α-equivalence
cache <- converge lowerBound (\ prevCache -> isolateCache $ raiseHandler locally $ do
TermEvaluator (putEnv (configurationEnvironment c))
TermEvaluator (putHeap (configurationHeap c))
-- We need to reset fresh generation so that this invocation converges.
resetFresh 0 $

View File

@ -2,7 +2,6 @@
module Control.Abstract.Environment
( Environment
, getEnv
, putEnv
, lookupEnv
, bind
, bindAll
@ -28,10 +27,6 @@ import Prologue
getEnv :: Member (Env address) effects => Evaluator address value effects (Environment address)
getEnv = send GetEnv
-- | Set the environment.
putEnv :: Member (Env address) effects => Environment address -> Evaluator address value effects ()
putEnv = send . PutEnv
-- | Look a 'Name' up in the current environment, trying the default environment if no value is found.
lookupEnv :: Member (Env address) effects => Name -> Evaluator address value effects (Maybe address)
@ -62,7 +57,6 @@ data Env address return where
Push :: Env address ()
Pop :: Env address ()
GetEnv :: Env address (Environment address)
PutEnv :: Environment address -> Env address ()
handleEnv :: forall address effects value result
. Member (State (Environment address)) effects
@ -75,7 +69,6 @@ handleEnv = \case
Push -> modify (Env.push @address)
Pop -> modify (Env.pop @address)
GetEnv -> get
PutEnv e -> put e
runEnv :: Member (State (Environment address)) effects
=> Evaluator address value (Env address ': effects) a