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

Antiquoted

Constructors

ConstructorFieldsDescription
Plaincontents: vLiteral value: Text in string parts, String in DynamicKey
Antiquotedcontents: ExprEmbedded expression ${...}
EscapedNewline(none)Escaped newline \ in indented strings

Description

Antiquoted is polymorphic in the Plain constructor. It is used at two type arguments:

  • Antiquoted Text: in string parts (DoubleQuoted / Indented), Plain wraps literal text.
  • Antiquoted String: in DynamicKey, Plain wraps a String AST node (DoubleQuoted / Indented).

A string like "hello ${x} world" becomes a list: [Plain "hello ", Antiquoted (Sym "x"), Plain " world"]

Pages

  • String: DoubleQuoted / Indented containers
  • Str: expression wrapper

Nix Library Access

syntax.mkPlain "hello"       # text content (string parts)
syntax.mkAntiquoted (syntax.mkSym "x")
syntax.mkEscapedNewline