docs: tuple syntax cutover — Tuple(...) type, .(...) value, channel-outside-Tuple failables
Rewrite specs.md tuple/failable/pack/UFCS/grammar sections to the new syntax, update readme.md, and refresh stale tuple references in example header comments. Also fixes two pre-existing doc inaccuracies surfaced in review: drop the value-discarding `;` in the tuple-return examples, and correct the §13 function-type grammar production (optional param list + optional trailing `!` channel). Optional semantics unchanged. current/CHECKPOINT-LANG.md logs the cutover.
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
// arrive in Phase 2 — do NOT expect this to compile/run yet. The authoritative
|
||||
// checks are the parser unit tests in src/parser.zig ("parse pack expansion: …").
|
||||
|
||||
// 1. Tuple value position — `(..pack)` / `(..pack.field)`:
|
||||
// 1. Tuple value position — `.(..pack)` / `.(..pack.field)`:
|
||||
tv1 :: () => .(..xs);
|
||||
tv2 :: () => .(..xs.value);
|
||||
tv3 :: () => .(a, ..xs, b); // mixed positional + spread
|
||||
|
||||
// 2. Tuple type position — `(..F(Ts))` / `(..F(Ts.Arg))`:
|
||||
// 2. Tuple type position — `Tuple(..F(Ts))` / `Tuple(..F(Ts.Arg))`:
|
||||
tt1 :: (x: Tuple(..ValueListenable(Ts))) => x;
|
||||
tt2 :: (x: Tuple(..ValueListenable(Ts.Arg))) => x;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user