![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
Classes | |
| struct | AstSymbols |
Public Member Functions | |
| virtual void | show (const SymbolTable &symbols, std::ostream &str) const |
| virtual void | bindVars (EvalState &es, const std::shared_ptr< const StaticEnv > &env) |
| virtual void | eval (EvalState &state, Env &env, Value &v) |
| void | eval (EvalState &state, Env &env, Value &v, std::string_view errorCtx) |
| virtual Value * | maybeThunk (EvalState &state, Env &env) |
| virtual void | evalForUpdate (EvalState &state, Env &env, UpdateQueue &q, std::string_view errorCtx) |
| virtual void | setName (Symbol name) |
| virtual void | setDocComment (DocComment docComment) |
| virtual PosIdx | getPos () const |
| virtual void | resetCursedOr () |
| virtual void | warnIfCursedOr (const SymbolTable &symbols, const PosTable &positions) |
Static Public Attributes | |
| static Counter | nrExprs |
Normal evaluation, implemented directly by all subclasses.
Reimplemented in nix::ExprAssert, nix::ExprAttrs, nix::ExprBlackHole, nix::ExprCall, nix::ExprConcatStrings, nix::ExprFloat, nix::ExprIf, nix::ExprInt, nix::ExprLambda, nix::ExprLet, nix::ExprList, nix::ExprOpAnd, nix::ExprOpConcatLists, nix::ExprOpEq, nix::ExprOpHasAttr, nix::ExprOpImpl, nix::ExprOpNEq, nix::ExprOpNot, nix::ExprOpOr, nix::ExprOpUpdate, nix::ExprPath, nix::ExprPos, nix::ExprSelect, nix::ExprString, nix::ExprVar, and nix::ExprWith.
Wrapper around the above that adds errorCtx to any thrown errors.
|
virtual |
Only called when performing an attrset update: // or similar. Instead of writing to a Value &, this function writes to an UpdateQueue. This allows the expression to perform multiple updates in a delayed manner, gathering up all the updates before applying them.
Reimplemented in nix::ExprOpUpdate.
Create a thunk for the delayed computation of the given expression in the given environment. But if the expression is a variable, then look it up right away. This significantly reduces the number of thunks allocated.
Reimplemented in nix::ExprFloat, nix::ExprInt, nix::ExprList, nix::ExprPath, nix::ExprString, and nix::ExprVar.