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

Keep the builtins around.

This commit is contained in:
Rob Rix 2018-05-30 18:13:36 -04:00
parent 7e68c0723a
commit 334f8738c0

View File

@ -122,8 +122,8 @@ evaluatePackageWith analyzeModule analyzeTerm package
maybe (pure v) ((`call` []) <=< variable) sym
evalPrelude prelude = raiseHandler (runModules (runTermEvaluator . evalModule emptyEnv)) $ do
_ <- runInModule emptyEnv moduleInfoFromCallStack (TermEvaluator (defineBuiltins $> unit))
evalModule emptyEnv prelude
(_, builtinsEnv) <- runInModule emptyEnv moduleInfoFromCallStack (TermEvaluator (defineBuiltins $> unit))
second (mergeEnvs builtinsEnv) <$> evalModule builtinsEnv prelude
withPrelude Nothing f = f emptyEnv
withPrelude (Just prelude) f = do