Nix  2.93.0-dev
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::ExprLambda Struct Reference
Inheritance diagram for nix::ExprLambda:
[legend]
Collaboration diagram for nix::ExprLambda:
[legend]

Public Member Functions

 ExprLambda (PosIdx pos, std::unique_ptr< Pattern > pattern, std::unique_ptr< Expr > body)
 
void setName (Symbol name) override
 
std::string showNamePos (const EvalState &state) const
 
std::string getName (SymbolTable const &symbols) const
 
std::string getQuotedName (SymbolTable const &symbols) const
 
- Public Member Functions inherited from nix::Expr
 Expr (const Expr &)=delete
 
Exproperator= (const Expr &)=delete
 
virtual JSON toJSON (const SymbolTable &symbols) const
 
virtual void bindVars (Evaluator &es, const std::shared_ptr< const StaticEnv > &env)
 
virtual void eval (EvalState &state, Env &env, Value &v)
 
virtual ValuemaybeThunk (EvalState &state, Env &env)
 
PosIdx getPos () const
 

Public Attributes

Symbol name
 
std::unique_ptr< Patternpattern
 
std::unique_ptr< Exprbody
 
- Public Attributes inherited from nix::Expr
PosIdx pos
 

Additional Inherited Members

- Protected Member Functions inherited from nix::Expr
 Expr (Expr &&)=default
 
Exproperator= (Expr &&)=default
 
 Expr (const PosIdx pos)
 

Member Function Documentation

◆ getName()

std::string nix::ExprLambda::getName ( SymbolTable const & symbols) const
inline

Returns the name of the lambda, or "anonymous lambda" if it doesn't have one.

◆ getQuotedName()

std::string nix::ExprLambda::getQuotedName ( SymbolTable const & symbols) const
inline

Returns the name of the lambda in single quotes, or "anonymous lambda" if it doesn't have one.

◆ setName()

void nix::ExprLambda::setName ( Symbol name)
overridevirtual

Reimplemented from nix::Expr.

Member Data Documentation

◆ name

Symbol nix::ExprLambda::name

Name of the lambda. This is set if the lambda is defined in a let-expression or an attribute set, such that there is a name. Lambdas may have a falsey symbol as the name if they are anonymous


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