1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Connect AbstractPos with Pos

This commit is contained in:
Eelco Dolstra 2022-07-05 20:43:20 +02:00
parent 9e9170a92e
commit 72dffd6c6c
13 changed files with 95 additions and 119 deletions

View file

@ -215,9 +215,8 @@ static std::ostream & showDebugTrace(std::ostream & out, const PosTable & positi
: (std::shared_ptr<AbstractPos>) positions[dt.expr.getPos() ? dt.expr.getPos() : noPos];
if (pos) {
pos->print(out);
if (auto loc = pos->getCodeLines()) {;
out << pos;
if (auto loc = pos->getCodeLines()) {
out << "\n";
printCodeLines(out, "", *pos, *loc);
out << "\n";
@ -584,7 +583,9 @@ bool NixRepl::processLine(std::string line)
return {filename, 0};
} else if (v.isLambda()) {
auto pos = state->positions[v.lambda.fun->pos];
return {pos.file, pos.line};
// FIXME
abort();
//return {pos.file, pos.line};
} else {
// assume it's a derivation
return findPackageFilename(*state, v, arg);