![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <eval.hh>
Public Attributes | |
| PosIdx | pos |
A position at which a primop is invoked (noPos or presumably an ExprCall location).
If you're about to pass your primop call position to a different function that runs in your primop implementation, then stop, because that position has already been printed in the trace. Just don't pass a pos, or pass noPos.
Nonetheless, we pass the call site to the primop so that it can be used in other contexts than the usual try/catch/addTrace flow, and specifically as extra context in delayed computations that may fail.
Alternatively, a primop registration can set PrimOp::addTrace = false, so that the otherwise redundant trace item is suppressed, and the primop becomes responsible for printing its call site location, allowing for some customization of the trace.