Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::CallSite Struct Reference

#include <eval.hh>

Public Attributes

PosIdx pos

Detailed Description

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.

Member Data Documentation

◆ pos

PosIdx nix::CallSite::pos

An already printed pos! Don't make it noisy. Read the CallSite comment.


The documentation for this struct was generated from the following file: