"while evaluating a path segment" was just plain wrong Co-authored-by: eldritch horrors <pennae@lix.systems> Change-Id: I827374635df2887d17a8ee8b1755c078bf0b506b
60 lines
1.2 KiB
Plaintext
60 lines
1.2 KiB
Plaintext
nix-repl> 1 + 1
|
|
2
|
|
|
|
nix-repl> :doc builtins.add
|
|
Synopsis: builtins.add e1 e2
|
|
|
|
Return the sum of the numbers e1 and e2.
|
|
|
|
|
|
nix-repl> f = a: "" + a
|
|
|
|
Expect the trace to not contain any traceback:
|
|
|
|
nix-repl> f 2
|
|
error:
|
|
… while concatenating
|
|
at «string»:1:11:
|
|
1| f = a: "" + a
|
|
| ^
|
|
|
|
error: cannot coerce an integer to a string: 2
|
|
|
|
nix-repl> :te
|
|
showing error traces
|
|
|
|
Expect the trace to have traceback:
|
|
|
|
nix-repl> f 2
|
|
error:
|
|
… from call site
|
|
at «string»:1:1:
|
|
1| f 2
|
|
| ^
|
|
|
|
… while calling anonymous lambda
|
|
at «string»:1:5:
|
|
1| f = a: "" + a
|
|
| ^
|
|
|
|
… while concatenating
|
|
at «string»:1:11:
|
|
1| f = a: "" + a
|
|
| ^
|
|
|
|
error: cannot coerce an integer to a string: 2
|
|
|
|
Turning it off should also work:
|
|
|
|
nix-repl> :te
|
|
not showing error traces
|
|
|
|
nix-repl> f 2
|
|
error:
|
|
… while concatenating
|
|
at «string»:1:11:
|
|
1| f = a: "" + a
|
|
| ^
|
|
|
|
error: cannot coerce an integer to a string: 2
|