1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

print staticenv bindings

This commit is contained in:
Ben Burdette 2021-10-11 16:32:43 -06:00
parent 2ee1fa4afd
commit 98eb13691a
3 changed files with 39 additions and 3 deletions

View file

@ -107,10 +107,16 @@ ref<EvalState> EvalCommand::getEvalState()
if (startReplOnEvalErrors)
debuggerHook = [evalState{ref<EvalState>(evalState)}](const Error & error, const Env & env, const Expr & expr) {
printError("%s\n\n" ANSI_BOLD "Starting REPL to allow you to inspect the current state of the evaluator.\n" ANSI_NORMAL, error.what());
printStaticEnvBindings(expr);
// printEnvPosChain(env);
printEnvBindings(env);
auto vm = mapEnvBindings(env);
runRepl(evalState, *vm);
// printEnvBindings(env);
if (expr.staticenv)
{
auto vm = mapStaticEnvBindings(*expr.staticenv.get(), env);
runRepl(evalState, *vm);
}
};
}
return ref<EvalState>(evalState);