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

#include <eval.hh>

Public Member Functions

void check ()

Public Attributes

std::string name
std::vector< std::string > args
size_t arity = 0
std::optional< std::string > doc
bool addTrace = true
fun< PrimOpFun > impl
std::optional< ExperimentalFeature > experimentalFeature
bool internal = false

Detailed Description

Info about a primitive operation, and its implementation

Member Function Documentation

◆ check()

void nix::PrimOp::check ( )

Validity check to be performed by functions that introduce primops, such as RegisterPrimOp() and Value::mkPrimOp().

Member Data Documentation

◆ addTrace

bool nix::PrimOp::addTrace = true

Add a trace item, while calling the <name> builtin.

This is used to remove the redundant item for builtins.addErrorContext.

◆ args

std::vector<std::string> nix::PrimOp::args

Names of the parameters of a primop, for primops that take a fixed number of arguments to be substituted for these parameters.

◆ arity

size_t nix::PrimOp::arity = 0

Aritiy of the primop.

If args is not empty, this field will be computed from that field instead, so it doesn't need to be manually set.

◆ doc

std::optional<std::string> nix::PrimOp::doc

Optional free-form documentation about the primop.

◆ experimentalFeature

std::optional<ExperimentalFeature> nix::PrimOp::experimentalFeature

Optional experimental for this to be gated on.

◆ impl

fun<PrimOpFun> nix::PrimOp::impl

Implementation of the primop.

◆ internal

bool nix::PrimOp::internal = false

If true, this primop is not exposed to the user.

◆ name

std::string nix::PrimOp::name

Name of the primop. __ prefix is treated specially.


The documentation for this struct was generated from the following files:
  • libexpr/include/nix/expr/eval.hh
  • libexpr/eval.cc