diff --git a/design/models/0001-authoring-surface.md b/design/models/0001-authoring-surface.md index 92b6fb7..29fd3bb 100644 --- a/design/models/0001-authoring-surface.md +++ b/design/models/0001-authoring-surface.md @@ -58,7 +58,18 @@ Every other maximal token is classified post-hoc: Consequence: arithmetic operators like `+` / `-` / `*` / `/` / `%`, qualified names like `io/print_str`, and cross-module references like `std_list.map` are all single ident tokens with no special -lex rule. The only reserved tokens are `(`, `)`, and whitespace. +lex rule. The only token *delimiters* are `(`, `)`, and whitespace. + +One character is *reserved within* a token: `$`. Any identifier +token containing `$` is rejected by the lexer +(`LexError::ReservedDollar` in `crates/ailang-surface/src/lex.rs`), +because `$` is reserved for the compiler's synthetic namespace +(match-scrutinee, lifted-let-rec, and shadow-rename binders). +Making `$` unauthorable keeps that synthetic namespace +collision-free by construction. The reservation is on the +Form-(A) authoring surface only — `$` inside a string literal or +a comment is unaffected, and the canonical `.ail.json` +deserialization path is intentionally not guarded. Bool literals (`true`, `false`) and unit (`(lit-unit)`) are disambiguated by parser context, not by lex. Comparison and equality are class methods (`eq` / `compare`) and named fns