defer: 24.2 + 24.3 — Show + print rewire blocked on MethodNameCollision retirement
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.
This commit is contained in:
+19
-3
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user