From 334f8738c02cdbeff7911ffc097bbbe72620aa80 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 30 May 2018 18:13:36 -0400 Subject: [PATCH] Keep the builtins around. --- src/Data/Abstract/Evaluatable.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Abstract/Evaluatable.hs b/src/Data/Abstract/Evaluatable.hs index 3cfbb174e..31d761ebb 100644 --- a/src/Data/Abstract/Evaluatable.hs +++ b/src/Data/Abstract/Evaluatable.hs @@ -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