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

Bool (Boolean Atom)

Definition

Bool Bool

Fields

FieldTypeDescription
contentsBoolTrue or False

Nix Source ↔ AST

# Nix
true

# AST (wrapped in Constant)
{
  "tag": "Constant",
  "contents": { "tag": "Bool", "contents": true }
}
# Nix
false

# AST (wrapped in Constant)
{
  "tag": "Constant",
  "contents": { "tag": "Bool", "contents": false }
}
  • Constant: wrapper for atoms in expressions

Nix Library Access

syntax.mkBool true
syntax.mkBool false
syntax.mkConstant (syntax.mkBool true)