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

add nullable Expr argument

This commit is contained in:
Ben Burdette 2021-10-11 14:42:29 -06:00
parent aad27143c6
commit 2ee1fa4afd
4 changed files with 74 additions and 63 deletions

View file

@ -97,7 +97,7 @@ EvalCommand::EvalCommand()
});
}
// extern std::function<void(const Error & error, const std::map<std::string, Value *> & env)> debuggerHook;
extern std::function<void(const Error & error, const Env & env)> debuggerHook;
extern std::function<void(const Error & error, const Env & env, const Expr & expr)> debuggerHook;
ref<EvalState> EvalCommand::getEvalState()
{
@ -105,7 +105,7 @@ ref<EvalState> EvalCommand::getEvalState()
if (!evalState) {
evalState = std::make_shared<EvalState>(searchPath, getStore());
if (startReplOnEvalErrors)
debuggerHook = [evalState{ref<EvalState>(evalState)}](const Error & error, const Env & env) {
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());
// printEnvPosChain(env);
printEnvBindings(env);