1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

more cleanup

This commit is contained in:
Ben Burdette 2021-12-27 18:29:55 -07:00
parent 4610e02d04
commit 5954cbf3e9
5 changed files with 18 additions and 49 deletions

View file

@ -73,14 +73,6 @@ ref<EvalState> EvalCommand::getEvalState()
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);
// std::cout << evalState->vCallFlake << std::endl;
// std::cout << "expr: " << std::endl;
// expr.show(std::cout);
// std::cout << std::endl;
if (expr.staticenv)
{
auto vm = mapStaticEnvBindings(*expr.staticenv.get(), env);

View file

@ -434,7 +434,6 @@ bool NixRepl::processLine(string line)
<< " :doc <expr> Show documentation of a builtin function\n"
<< " :d <cmd> Debug mode commands\n"
<< " :d stack Show call stack\n"
// << " :d stack <int> Detail for stack level N\n"
<< " :d env Show env stack\n"
<< " :d error Show current error\n";
}
@ -708,19 +707,6 @@ void NixRepl::addVarToScope(const Symbol & name, Value & v)
varNames.insert((string) name);
}
// version from master.
// void NixRepl::addVarToScope(const Symbol & name, Value & v)
// {
// if (displ >= envSize)
// throw Error("environment full; cannot add more variables");
// if (auto oldVar = staticEnv.find(name); oldVar != staticEnv.vars.end())
// staticEnv.vars.erase(oldVar);
// staticEnv.vars.emplace_back(name, displ);
// staticEnv.sort();
// env->values[displ++] = &v;
// varNames.insert((string) name);
// }
Expr * NixRepl::parseString(string s)
{
Expr * e = state->parseExprFromString(s, curDir, staticEnv);