docs(debt #44): turbofish prose truth-up — coercion sites to the letter form #72

Manually merged
tvidal merged 7 commits from feat/072-docs-debt-44-turbofish-prose-truth-up-coercion into master 2026-03-31 16:20:39 +02:00
Owner

docs(debt #44): turbofish prose truth-up — coercion sites to the letter form

Along the way:

  • feat(operators B1): the content-driven operator parser — all 22 declared, tables killed
  • docs: session handoff — tenth (operators/orchestrate) session; scalar-repr collapse LANDED (0bb27d9, debts #33/#43 closed, V5), docs #44 swept (e7df181), operators B1 LANDED (eeee945, all 22 content-driven, E0146/E0135, O1/O2); B2 IN-FLIGHT in .worktrees/operators-b2 (BinOp extinct, net −569, debt #35 armed) blocked on the String-bounds owner ruling (A/B/C recorded, A recommended); debts 46-49 minted; worktree/checkout/stop-trigger protocol lessons recorded
  • added primes drag race wheel v2 and v3
  • fix(corpus): wheel_v3 chains parenthesised left-assoc under the E0146 no-associativity law
  • checkpoint(io): the 10-leaf IO floor widening (read + socket family), tables only
  • feat(io): the wayward + File streaming stone — read_bytes runtime-proven

Touches 65 files: Floor.ck, docs/current-state.md, docs/pitch.md, docs/stdlib.md, docs/syntax.md, handoff.md and 59 more.

docs(debt #44): turbofish prose truth-up — coercion sites to the letter form Along the way: - feat(operators B1): the content-driven operator parser — all 22 declared, tables killed - docs: session handoff — tenth (operators/orchestrate) session; scalar-repr collapse LANDED (0bb27d9, debts #33/#43 closed, V5), docs #44 swept (e7df181), operators B1 LANDED (eeee945, all 22 content-driven, E0146/E0135, O1/O2); B2 IN-FLIGHT in .worktrees/operators-b2 (BinOp extinct, net −569, debt #35 armed) blocked on the String-bounds owner ruling (A/B/C recorded, A recommended); debts 46-49 minted; worktree/checkout/stop-trigger protocol lessons recorded - added primes drag race wheel v2 and v3 - fix(corpus): wheel_v3 chains parenthesised left-assoc under the E0146 no-associativity law - checkpoint(io): the 10-leaf IO floor widening (read + socket family), tables only - feat(io): the wayward + File streaming stone — read_bytes runtime-proven Touches 65 files: `Floor.ck`, `docs/current-state.md`, `docs/pitch.md`, `docs/stdlib.md`, `docs/syntax.md`, `handoff.md` and 59 more.
tvidal requested changes 2026-03-31 09:56:43 +02:00
Dismissed
tvidal left a comment

I do not want to merge while the error path in src/rust/crates/ck_driver/tests/architecture/operators.rs is silent. The rest is fine.

I do not want to merge while the error path in `src/rust/crates/ck_driver/tests/architecture/operators.rs` is silent. The rest is fine.
@ -0,0 +99,4 @@
/// Whether `line` contains `needle` as a whole token — the char after the
/// match must not continue an identifier, so `SyntaxKind::Pipe` does NOT match
/// `SyntaxKind::PipeRParen` / `SyntaxKind::PipePipe` (a real substring hazard).
fn contains_token(line: &str, needle: &str) -> bool {
Owner

contains_token reads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?

`contains_token` reads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?
@ -0,0 +116,4 @@
);
let body = &stdout[LINE_PREFIX.len()..stdout.len() - LINE_SUFFIX.len()];
let (passes_str, seconds_str) = body.split_once(';').unwrap_or_else(|| {
panic!("expected `<passes>;<seconds>` between the fixed ends, got `{body}`")
Owner

This panics. Is panic unreachable, or unreachable today? If it is the second I would rather see an error the caller can handle.

This panics. Is `panic` unreachable, or unreachable today? If it is the second I would rather see an error the caller can handle.
Author
Owner

Split. The decision in contains_token is a pure function now, with its own tests in src/rust/crates/ck_driver/tests/architecture/operators.rs.

Split. The decision in `contains_token` is a pure function now, with its own tests in `src/rust/crates/ck_driver/tests/architecture/operators.rs`.
Author
Owner

Unreachable today, which is not the same thing. panic returns an error variant now, and src/rust/crates/ck_driver/tests/primes_actor_garage_wheel_v2_run.rs has a test that drives the path.

Unreachable today, which is not the same thing. `panic` returns an error variant now, and `src/rust/crates/ck_driver/tests/primes_actor_garage_wheel_v2_run.rs` has a test that drives the path.
Author
Owner

Updated. The point about src/rust/crates/ck_driver/tests/architecture/operators.rs turned out to be a real bug, so thank you.

Updated. The point about `src/rust/crates/ck_driver/tests/architecture/operators.rs` turned out to be a real bug, so thank you.
tvidal approved these changes 2026-03-31 15:21:35 +02:00
tvidal left a comment

Both answered, and src/rust/crates/ck_driver/tests/architecture/operators.rs reads right now. Merging.

Both answered, and `src/rust/crates/ck_driver/tests/architecture/operators.rs` reads right now. Merging.
The §1b two-surface law landed in a11c1bd; docs/* (ist) still showed the
pre-§1b universal-pin spellings. Swept top-level docs/*.md: 12 coercion sites
rewritten to the letter form (8::u8, x::f32, [1,2,3]::List<Int,12>, …); all
genuine specializations left (path/generic-call receivers, and the []::<T>
/ []::<T,N> empty-list specialization surfaces per plan_values_02 §1b and
the coercion_letter_form golden). syntax.md's superseded "universal pin"
law paragraph re-stated as the two-surface law (locked 2026-05-28, amended
2026-07-17); list-literal element/bound prose reworded to the coercion-
target form. Verified: remaining `::<` in docs/*.md are specializations
only; no file outside docs/ touched.

Flagged for follow-up (not this sweep's scope): syntax.md's claim that
annotated-bound assignment does not type-check may be stale against
plan_values_02 §2's bound-bucket law — surfaced to owner, not edited.

Closes debt #44 for top-level docs; docs/impl/** not in scope this pass.
The parser's operator knowledge now comes from Operators.ck (slice 7 first
half, plan_operators §0/§1/§2; B2 — the trait desugar + the hir::BinOp kill —
follows). The loader-live tests/corpus/stdlib/Operators.ck (header-marked
copy of the authored root; ONE documented divergence: &&/|| bodies use the
implemented block-if, the authored then-form is design-only) is the single
content source, embedded by ck_parser via include_str! and settled into
OperatorTable (glyph → fixity/precedence); parse_with_operators is the
content-driven entry and the 59 parse() sites ride the standard table.

Lexer: `operator` keyword; all 22 glyphs tokenize (added ~ ^ & | ++ << >>;
each collision individually verified; (|/|)/|| preserved). The >> nested-
generic collision solved the standard way: lexed whole, split into two > at
every generic close (new ck_parser/src/angle.rs; proven by List<List<Char>>
and receive<List<Todo::Task,12>> staying green).

New operator_decl.rs parses the labeled decl form; associativity label is
E0135 (declaration error). Pratt engine driven by precedence ALONE
(op_bp uniform transform); no-associativity is UNIVERSAL: same-precedence
chains are E0146 with a parentheses-required diagnostic. Word/sigil grammar
(is/with/not/and/or, ranges) kept as justified parser mechanism per the
three-layer ruling (owner 2026-07-09/2026-07-18) — not operator content.

KILL (grep-proven, dead_code deny green): infix_binding_power,
infix_node_kind, NEG_BP, BANG_BP, the symbol-prefix dispatch arms.

Migration: 15 corpus/stdlib files, 40 same-precedence chain lines
parenthesised meaning-preserving (incl. Assert/Mailbox/Meta/Test.ck);
3 trap ledgers updated. Conformance: tests/parser/operator/ negative rows
(a+b+c, a==b==c, a<b<c → E0146; undeclared glyph) + positives; the
delete-the-+-declaration property gate proves no built-in operator exists.
Arch: O1 (killed table names banned) + O2 (no glyph operator in the Pratt
engine), both error-level, red-proven (orchestrator re-proved O1 first-hand).

Gates: fmt 0, clippy 0, suite green except the 3 by-design soft-asserts;
untrapped ratchet held at 98; R3 caps held by extraction (angle.rs).
Net production Rust: ~+489 (engine + table machinery; B1 is the additive
half — B2 owns the binop_lower/hir::BinOp kill).
The three same-precedence chains (count-walk acc/cnt accumulators, the base
formula) grouped exactly as the old parser did — semantics proven unchanged by
the 5 s race gate (78,498-validated per pass). corpus_apps_match_their_trap_md
green again; no trap.md minted (a runnable registered app stays clean).
NOTE for operators B2 landing: this file postdates B2's 19-file migration
list — fold it into the finishing pass's +→++ sweep.
tvidal manually merged commit 1d855fd70f into master 2026-03-31 16:20:39 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
northgale/cklang-bootstrap!72
No description provided.