From 062a811d7cae306b5fe7374ddd92c6d8a0317854 Mon Sep 17 00:00:00 2001 From: Brummel Date: Wed, 13 May 2026 00:00:50 +0200 Subject: [PATCH] =?UTF-8?q?defer:=2024.2=20+=2024.3=20=E2=80=94=20Show=20+?= =?UTF-8?q?=20print=20rewire=20blocked=20on=20MethodNameCollision=20retire?= =?UTF-8?q?ment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 24.2 plan-recon surfaced a spec-gap: adding `class Show` to the prelude would collide with the user-class `Show` declared by 14 test fixtures under examples/test_22b{1,2,3}_*.ail.json (plus hardcoded "Show" / "show" assertions in crates/ail/tests/typeclass_22b{2,3}.rs) through the workspace-global method-name-collision pre-pass at crates/ailang-core/src/workspace.rs:547. Three resolution paths surfaced: (A) prep-iter rename Show→Render in fixtures+tests, (B) inline-rename in 24.2 (makes iter bigger), (C) defer 24.2+24.3 until the P2 milestone "Module-qualified class names + type-driven method dispatch" retires the MethodNameCollision workaround. User picked C. Spec status flips Draft → Partial; the document remains as historical context for the future re-brainstorm. Iter 24.1 retains as standalone runtime infrastructure (`bool_to_str` + `str_clone` heap-Str primitives are user-callable today; they wait for the deferred Show instances to find their primary caller). Roadmap P1 entry flips `[ ] → [~]` with `depends on:` line pointing at the P2 milestone. --- docs/roadmap.md | 22 +++++++++++++++++++--- docs/specs/2026-05-12-24-show-print.md | 18 +++++++++++++++++- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/docs/roadmap.md b/docs/roadmap.md index 46f7921..429fa8d 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -61,12 +61,28 @@ context. Pick the next milestone from P1.)_ runtime"); spec 2026-05-09-22-typeclasses §22b.4b ("Show#Int needs an `int_to_str` primitive returning heap-allocated Str"). -- [ ] **\[milestone\]** Post-22 Prelude — Show + print rewire — ship +- [~] **\[milestone\]** Post-22 Prelude — Show + print rewire — ship `Show` typeclass with `Show Int/Bool/Str/Float` instances; rewire `print` through `Show.show`. Originally queued as 22b.4 in the typeclass milestone, kept on hold pending demand and the - heap-`Str` prerequisite. - - context: brainstorm 2026-05-12 (iter 23.5 wrap). + heap-`Str` prerequisite. Spec `docs/specs/2026-05-12-24-show-print.md` + approved; iter 24.1 (runtime + codegen for two new heap-Str + primitives `bool_to_str` + `str_clone`) shipped 2026-05-12 @ f38bad8. + Iters 24.2 (prelude `class Show` + four instances) and 24.3 + (polymorphic `print` free fn + E2E) deferred — adding `class Show` + to the prelude collides with the user-class `Show` declared by + 14 test fixtures under `examples/test_22b{1,2,3}_*.ail.json` (plus + hardcoded `"Show"` / `"show"` assertions in `crates/ail/tests/typeclass_22b{2,3}.rs`) + through the workspace-global method-name-collision pre-pass at + `crates/ailang-core/src/workspace.rs:547`. Resumes once the + dependency below ships and the spec re-brainstorms against the + post-retirement architecture. + - context: brainstorm 2026-05-12 (iter 23.5 wrap); deferral + 2026-05-13 (user-direction Option C after plan-recon flagged the + collision; iter 24.1 retained as standalone runtime infrastructure). + - depends on: P2 milestone "Module-qualified class names + + type-driven method dispatch" (retires the `MethodNameCollision` + workaround that drives the collision). ## P2 — Medium-term diff --git a/docs/specs/2026-05-12-24-show-print.md b/docs/specs/2026-05-12-24-show-print.md index 11a0f58..ed3cff9 100644 --- a/docs/specs/2026-05-12-24-show-print.md +++ b/docs/specs/2026-05-12-24-show-print.md @@ -1,7 +1,23 @@ # 24 — Show + print rewire — Design Spec **Date:** 2026-05-12 -**Status:** Draft — awaiting user spec review +**Status:** Partial — iter 24.1 shipped 2026-05-12 @ `f38bad8` +(`bool_to_str` + `str_clone` runtime + codegen wiring); iters 24.2 +and 24.3 **deferred** on 2026-05-13 pending the retirement of the +`MethodNameCollision` workaround. The deferral was triggered by a +spec-gap surfaced during 24.2 plan-recon: adding `class Show` to +the prelude collides with the user-class `Show` declared by 14 +test fixtures under `examples/test_22b{1,2,3}_*.ail.json` (plus +hardcoded `"Show"` / `"show"` assertions in +`crates/ail/tests/typeclass_22b{2,3}.rs`) through the +workspace-global method-name-collision pre-pass at +`crates/ailang-core/src/workspace.rs:547`. Three resolution paths +were surfaced; the user picked "defer until +`MethodNameCollision` retires" per the P2 roadmap entry +"Module-qualified class names + type-driven method dispatch". A +fresh brainstorm re-derives 24.2 + 24.3 from scratch against the +post-retirement architecture; this document remains as historical +context for that re-brainstorm. **Authors:** Brummel (orchestrator) + Claude ## Goal