From 18b49e1d31a9aedcc7649588149e397a10a8c9e8 Mon Sep 17 00:00:00 2001 From: Brummel Date: Mon, 11 May 2026 21:38:16 +0200 Subject: [PATCH] =?UTF-8?q?spec:=2023=20=E2=80=94=20fix=20fixture=20name?= =?UTF-8?q?=20(poly=5Fbox=5Fproj=20=E2=86=92=20poly=5Frec=5Fcapture)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plan-recon for iter 23.4 surfaced that poly_box_proj.ail.json does not exist in examples/. The three load-bearing regression fixtures are poly_id, poly_apply, and poly_rec_capture (the latter at examples/poly_rec_capture.ail.json, driven by e2e.rs::poly_rec_capture_demo). Three references in the spec corrected. Substantive intent (three existing polymorphic fixtures regress unchanged under unified mono) unchanged. --- docs/specs/2026-05-11-23-eq-ord-prelude.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/specs/2026-05-11-23-eq-ord-prelude.md b/docs/specs/2026-05-11-23-eq-ord-prelude.md index 737c356..32f8d58 100644 --- a/docs/specs/2026-05-11-23-eq-ord-prelude.md +++ b/docs/specs/2026-05-11-23-eq-ord-prelude.md @@ -141,7 +141,7 @@ Int/Bool/Str is acknowledged and ratified as transitional. | 23.3 | shipped (2026-05-10) | `class Ord extends Eq` + `Ord Int/Bool/Str` + `ail_str_compare`. | | 23.4-prep | shipped, **kept** | commits `8d39f13` (linearity registers `Def::Class` method types in globals) + `aef4ab8` (check bare-name fall-through to implicit-imported free fns). Both resolve names *before* mono; independent of B1. | | 23.4-prep2 / 23.4-prep3 | shipped, **rolled back in 23.4** | commits `a06159d` + `c42a0f5` — codegen bare-name fall-throughs. Provably dead after Mono unification. | -| **23.4** (revised) | upcoming | **Mono-Pass unification.** Restructure `crates/ailang-check/src/mono.rs::monomorphise_workspace` into one specialiser with two source-body entry points (class-method via `Registry::entries`, free-fn direct). Extend `collect_mono_targets` to also produce targets for polymorphic free-fn calls with fully-concrete substitutions. Remove `lower_polymorphic_call` + `module_polymorphic_fns` + `mono_queue` from codegen. Rollback prep2 + prep3. Amend DESIGN.md §"Resolution and monomorphisation" to describe the pass as covering all `Type::Forall`-Defs. Tests: existing polymorphic fixtures (`poly_id`, `poly_apply`, `poly_box_proj`) green; new fixture `cmp_max_smoke` proves cross-cutting (`cmp_max : forall a. Ord a => (a, a) -> a` at Int synthesises both `cmp_max__Int` and nested `compare__Int` in one fixpoint). | +| **23.4** (revised) | upcoming | **Mono-Pass unification.** Restructure `crates/ailang-check/src/mono.rs::monomorphise_workspace` into one specialiser with two source-body entry points (class-method via `Registry::entries`, free-fn direct). Extend `collect_mono_targets` to also produce targets for polymorphic free-fn calls with fully-concrete substitutions. Remove `lower_polymorphic_call` + `module_polymorphic_fns` + `mono_queue` from codegen. Rollback prep2 + prep3. Amend DESIGN.md §"Resolution and monomorphisation" to describe the pass as covering all `Type::Forall`-Defs. Tests: existing polymorphic fixtures (`poly_id`, `poly_apply`, `poly_rec_capture`) green; new fixture `cmp_max_smoke` proves cross-cutting (`cmp_max : forall a. Ord a => (a, a) -> a` at Int synthesises both `cmp_max__Int` and nested `compare__Int` in one fixpoint). | | **23.5** (revised) | upcoming | **Prelude free fns + E2E.** Add `ne`/`lt`/`le`/`gt`/`ge` to `examples/prelude.ail.json`. E2E fixtures: (a) positive polymorphic helper at Int/Bool/Str, (b) negative — `eq f g` at Float typecheck-rejects with Float-aware diagnostic, (c) user-ADT — `IntBox` with `Eq`/`Ord` instances + polymorphic helper monomorphises to the user instance. Amend DESIGN.md §"Decision 11 / Prelude classes" — Eq/Ord shipped; the "Milestone 22 ships no built-in Prelude classes" wording stays as historical accuracy with a forward-pointing addendum. Roadmap: P1 Post-22 Prelude entry from `[~]` to `[x]` for Eq/Ord half; Show half stays. | ## Data flow @@ -219,7 +219,7 @@ New categories under B1: - **Regression: existing polymorphic fixtures stay green.** `examples/poly_id.ail.json`, `examples/poly_apply.ail.json`, - `examples/poly_box_proj.ail.json`, and every 22b.3 typeclass + `examples/poly_rec_capture.ail.json`, and every 22b.3 typeclass fixture must compile and run unchanged. These are the load-bearing proof that codegen-time specialisation was structurally replaceable. @@ -284,7 +284,7 @@ The milestone closes when: built-in Prelude classes" wording stays as historical accuracy with a forward-pointing addendum. 5. **Tests pass:** `cargo test --workspace` green; existing - polymorphic fixtures (`poly_id`, `poly_apply`, `poly_box_proj`) + polymorphic fixtures (`poly_id`, `poly_apply`, `poly_rec_capture`) unchanged; new composition fixture (`cmp_max_smoke`) green; E2E fixtures from 23.5 green. 6. **Bench regression ratified:** `bench/check.py && bench/compile_check.py && bench/cross_lang.py`