In 36 hours across 8 PRs, verbose closed Phase A (self-recursive and mutually-recursive rules fully native) and opened Phase B — recursive data types. By the end of 2026-05-22, concept_group types (the foundation for linked lists, parse trees, and ASTs) are compiling to native x86-64 ELF binaries.
What shipped
Phase A — COMPLETE
Phase A gave recursive rules a native call stack. The last two slices closed the remaining restrictions:
-
Slice 5.3 — multi-field input (PR #38, 2026-05-21T07:03Z): the
pointer-in-rdiABI replaces the earliervalue-in-rdishortcut. Recursive rules with multi-field concept inputs now compile:rdicarries a pointer to the full record struct; fields are loaded from[rdi + offset]. The single-field shorthand was always a stepping stone. -
Slice 5.4 — mutual recursion (PR #39, 2026-05-21T08:21Z): a shared labels map resolves cross-rule
calltargets.is_even ↔ is_oddstyle call graphs compile. The DFS refusal from slice 5.0 is now a stepping stone too — it caught cycles early; now those cycles have a valid ABI to land in.
The Phase A arc: 5.0 (detect cycles, refuse clearly) → 5.1a (call/ret ABI) → bounds-check prerequisite → 5.1b (single-field factorial, 802B) → 5.2 (text return) → 5.3 (multi-field pointer-in-rdi) → 5.4 (mutual recursion). Complete.
Phase B — concept_group: recursive data types
Within 45 minutes of 5.4 landing, Phase B began:
-
Slice 1 — concept_group declaration (PR #40, 2026-05-21T08:47Z): new syntax for declaring a family of mutually-recursive sum types. A concept inside the group can reference other group members as field types — enabling
Token of { next: Token },Node of { children: Vec<Node> }, and eventually the full verbose AST. AST + parser + verifier wired; 6+ regression cases. -
Slice 3 — interpreter recursive Variants (PR #41, 2026-05-21T16:28Z):
eval_rule_with_valuenow handlesValue::Variantpayloads that contain otherValue::Variantvalues. The interpreter can construct and pattern-match linked lists before native emit is ready. This is the “try it” layer while native is being built.
Phase B native emit — same afternoon as the scope memo
On 2026-05-22, a scope memo (PR #42, docs-only, 16:33Z) immediately preceded three native-emit PRs on the same afternoon:
-
Slice 4a.1 (PR #43, 17:10Z): concept_group native prologue infrastructure — arena layout in the ELF binary, variant tag descriptors, type metadata. No behavior change yet; all scaffolding wired.
-
Slice 4a.2 (PR #44, 17:43Z):
emit_eval_exprhandlesExpr::VariantConstructon group concepts. Unit variants (Token::Eof) and payloaded variants (Token::Int { value: 42 }) allocate in the arena, write the tag, store fields. -
Slice 4a.3 (PR #45, 18:22Z):
emit_match_varianthandles concept_group scrutinees. Tag loaded from arena slot,cmp+jedispatch per arm, payload binders materialized. Number and Bool output arms fully operational.
From docs to working native emit: one afternoon.
Why it matters
Phase A solved recursive computation (factorial, mutual is_even/is_odd). Phase B solves recursive data — the shapes that real programs actually operate on: token streams, parse trees, typed ASTs.
The long-term goal is a verbose compiler written in verbose. That self-hosting target requires a token type, a parser that produces a tree, and a type-checker that walks that tree. All three require recursive data types. Phase B is the direct prerequisite.
The pattern: design doc → implementation in <24h
This is now a recurring pattern:
- Phase A.5.1: native call convention design (PR #33, 2026-05-19) → factorial binary (PR #36, 2026-05-20) — one day.
- Phase B.4a: scope memo (PR #42, 2026-05-22T16:33Z) → MatchVariant emit on group concepts (PR #45, 2026-05-22T18:22Z) — under two hours.
The common structure: a design doc reviewed by a fresh-context subagent, corrections applied, then implementation that doesn’t need to rediscover the decisions. The design work isn’t overhead — it’s a multiplier on implementation speed.
What’s next
Phase B has more slices ahead:
- Non-scalar outputs in match arms (text output, Result output — “4b+”)
- Recursive types in HTTP service handlers
- Multi-level recursion (the tree in
children: Vec<Node>pointing to its own group) - Nested group types
And the question that precedes self-hosting in earnest: v0.5.0. Phase A complete + Phase B native begun is a natural tag point.