1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 19:03:16 +02:00

Merge remote-tracking branch 'origin/master' into lazy-trees

This commit is contained in:
Eelco Dolstra 2022-05-11 13:34:49 +02:00
commit 087584ef4d
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
13 changed files with 1291 additions and 9 deletions

View file

@ -147,7 +147,10 @@ void Value::print(const SymbolTable & symbols, std::ostream & str,
else {
str << "[ ";
for (auto v2 : listItems()) {
v2->print(symbols, str, seen);
if (v2)
v2->print(symbols, str, seen);
else
str << "(nullptr)";
str << " ";
}
str << "]";
@ -184,6 +187,11 @@ void Value::print(const SymbolTable & symbols, std::ostream & str, bool showRepe
print(symbols, str, showRepeated ? nullptr : &seen);
}
// Pretty print types for assertion errors
std::ostream & operator << (std::ostream & os, const ValueType t) {
os << showType(t);
return os;
}
std::string printValue(const EvalState & state, const Value & v)
{
@ -1592,7 +1600,7 @@ void EvalState::autoCallFunction(Bindings & args, Value & fun, Value & res)
Nix attempted to evaluate a function as a top level expression; in
this case it must have its arguments supplied either by default
values, or passed explicitly with '--arg' or '--argstr'. See
https://nixos.org/manual/nix/stable/#ss-functions.)", symbols[i.name]);
https://nixos.org/manual/nix/stable/expressions/language-constructs.html#functions.)", symbols[i.name]);
}
}