| nix-ast tag | Fields | Description |
Abs | params: Params, body: Expr | Function abstraction (lambda) |
App | func: Expr, arg: Expr | Function application |
Assert | cond: Expr, body: Expr | Assertion assert cond; body |
Binary | op: Text, left: Expr, right: Expr | Binary operator |
Constant | contents: Atom | Atomic constant wrapper |
EnvPath | contents: FilePath | Search-path <nixpkgs> |
HasAttr | expr: Expr, attrPath: AttrPath | Has-attribute check set ? attr |
If | cond: Expr, thenExpr: Expr, elseExpr: Expr | Conditional |
Let | bindings: [Binding], body: Expr | Let bindings |
List | contents: [Expr] | List [ ... ] |
LiteralPath | contents: FilePath | Relative/absolute path ./foo.nix |
Select | defaultValue: Maybe Expr, expr: Expr, selectPath: AttrPath | Attribute selection set.attr or default |
Set | recursive: Bool, bindings: [Binding] | Attribute set { ... } |
Str | contents: String | String expression (wraps String) |
Sym | contents: VarName | Variable reference |
SynHole | contents: VarName | Syntax hole/placeholder |
Unary | op: Text, arg: Expr | Unary operator |
With | namespace: Expr, body: Expr | With expression with pkgs; ... |
Expr
├── Abs
├── App
├── Assert
├── Binary
├── Constant → wraps Atom (Int, Float, Bool, Null, Uri)
├── EnvPath
├── HasAttr
├── If
├── Let
├── List
├── LiteralPath
├── Select
├── Set
├── Str → wraps String (DoubleQuoted / Indented)
├── Sym
├── SynHole
├── Unary
└── With
- Abs: lambda abstraction
- App: function application
- List: list literal
- Set: attribute set
- Select: attribute selection
- Let: local bindings
- With: bring set into scope