1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 18:23:44 +03:00

Get the global environment instead of pulling it from the value type.

This commit is contained in:
Rob Rix 2018-03-13 12:30:17 -04:00
parent ee65c191bd
commit 0b96b5e987

View File

@ -77,8 +77,8 @@ load :: ( MonadAnalysis term value m
load name = askModuleTable >>= maybe notFound evalAndCache . moduleTableLookup name
where notFound = fail ("cannot load module: " <> show name)
evalAndCache e = do
v <- evaluateModule e
env <- environment v
void $ evaluateModule e
env <- getGlobalEnv
modifyModuleTable (moduleTableInsert name env)
pure env