Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

VarName

Description

VarName represents identifiers in Nix code: variable names, attribute names, parameter names, etc.

Nix Source ↔ AST

# Nix
myVariable

# AST (inside Sym)
{ "tag": "Sym", "contents": "myVariable" }

Used as the contents field of:

  • Sym: variable references
  • Param: function parameters
  • StaticKey: static attribute keys
  • Inherit: inherited names
  • ParamSet: parameter set parameter names

Nix Library Access

syntax.mkSym "myVariable"