iter 23.5: prelude free fns + E2E — Eq/Ord milestone close

Five polymorphic prelude free fns (ne/lt/le/gt/ge) plus three E2E
fixtures: positive composition over Int/Bool/Str, user-ADT with
user-written Eq/Ord on IntBox, and Float-NoInstance with a
Float-aware diagnostic addendum cross-referencing DESIGN.md §"Float
semantics".

Two checker-side fixes were needed alongside the prelude additions,
both symmetric to the iter 23.4-prep visibility fix:
- linearity::check_module_with_visible — workspace-aware callee-mode
  resolution so a Borrow-mode user fn forwarding into a prelude poly
  fn (e.g. `at_most x y = not (gt x y)`) doesn't false-fire
  consume-while-borrowed.
- mono::collect_mono_targets — distinguish rigid forall vars from
  unbound metavars; rigid-bearing free-fn targets skip (they get
  re-collected with concrete subst when the enclosing fn itself
  monomorphises). Without this, a polymorphic body calling another
  polymorphic free fn produced a spurious __Unit specialisation
  whose body referenced compare at Unit.

Roadmap split: shipped Eq/Ord half checked, Show + print-rewire half
remains pending behind the heap-Str ABI prerequisite. DESIGN.md
§"Prelude classes" amended.

One pre-existing fixture (test_22b1_missing_method) renamed its
class method ne → tne to avoid collision with the new prelude `ne`.

Bench: check.py + cross_lang.py exit 0; compile_check.py exits 1
with one sub-ms check_ms.local_rec_capture at +26% (tolerance 25%) —
prelude-growth-related noise-band fluctuation, ratifiable per spec
§248-249 and journal Concerns.
This commit is contained in:
2026-05-12 00:38:52 +02:00
parent 35c6eb5736
commit 92e830e6c2
21 changed files with 1321 additions and 41 deletions
@@ -0,0 +1,44 @@
{
"iter_id": "23.5",
"date": "2026-05-12",
"mode": "standard",
"outcome": "DONE",
"tasks_total": 8,
"tasks_completed": 8,
"reloops_per_task": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0
},
"review_loops_spec": 0,
"review_loops_quality": 0,
"blocked_reason": null,
"bench_results": {
"check_py_exit": 0,
"compile_check_py_exit": 1,
"compile_check_py_note": "one sub-ms check_ms regression (check_ms.local_rec_capture +26.36% over 25% tolerance) — ratifiable per audit tolerance, prelude grew by 5 polymorphic Def::Fns this iter",
"cross_lang_py_exit": 0
},
"inline_implementer_fixes": [
{
"file": "crates/ailang-check/src/linearity.rs",
"summary": "Workspace-aware visibility for imported poly free fns + class methods; symmetric extension of iter 23.4-prep",
"surfaced_by": "Task 3 user-defined at_most calling prelude gt"
},
{
"file": "crates/ailang-check/src/mono.rs",
"summary": "Distinguish rigid Type::Var (skip) from $m-prefixed metavars (Unit-default) in free-fn target collection",
"surfaced_by": "Task 3 — at_most's polymorphic body emitted spurious gt__Unit target"
},
{
"file": "examples/test_22b1_missing_method.ail.json",
"summary": "Rename class method ne→tne to avoid collision with new prelude free fn ne",
"surfaced_by": "Task 1 — workspace registry method-name uniqueness check"
}
]
}