From 18443ea2e91c6280c598243bae5878f7b1aab14d Mon Sep 17 00:00:00 2001 From: agra Date: Fri, 26 Jun 2026 13:14:06 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20PLAN-RACE=20status=20=E2=80=94=20foldin?= =?UTF-8?q?g=20done,=20next=20blocker=20is=20nested=20comptime-type-call?= =?UTF-8?q?=20composition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- current/PLAN-RACE.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/current/PLAN-RACE.md b/current/PLAN-RACE.md index 03f883de..100d4b8e 100644 --- a/current/PLAN-RACE.md +++ b/current/PLAN-RACE.md @@ -67,7 +67,22 @@ backed by the pointer TypeInfo's pointee TypeId (`src/ir/types.zig`). Lock with ## Status -- **Step 0 (prereq) DONE:** issue 0195 (tuple/array/vector field reflection) fixed + committed - (`8ac6c573`). Tuple reflection works on inline + `$T`-param forms. Issue 0196 (tuple *alias*) filed, - not on the critical path. -- **NEXT: Step 1 — the `pointee` builtin.** +Prereqs DONE (each committed + adversarially reviewed + suite-green): +- **issue 0195** (tuple/array/vector field reflection) fixed (`8ac6c573`). Tuple reflection works on + inline + `$T`-param forms. Issue 0196 (tuple *alias*) filed, not on the critical path. +- **`pointee($P) -> Type`** builtin added (`f1d29876`) — projects `*Task(A)` → `Task(A)`. +- **`field_count`/`size_of`/`align_of` fold as comptime constants** (`2a6ef398`) — so a generic + `($T) -> Type` builder can `inline for 0..field_count(T)` and size `[field_count(T)]EnumVariant`. + Verified: the variable-arity loop + array dim now work inside `RaceResult`. + +**NEXT BLOCKER (step 2, not yet resolved): nested comptime-type-call composition.** Building each +variant payload needs `*Task(A) → A`, i.e. `field_type(pointee(field_type(T, i)), 0)`. Today: +- passing a `field_type(...)` RESULT as the type-arg to a generic (`TaskResult(field_type(T, i))`) → + *"cannot infer generic type parameter 'P'"*; +- the same nested inline (`field_type(pointee(field_type(T, i)), 0)`) → *"cannot infer 'T' for + field_type"*; +- a `::` alias bound to a comptime-type-call result (`P0 :: field_type(NT, 0)`) → *"unresolved type + 'P0'"* (kin to issue 0196). +So a comptime-type-call's Type result isn't usable as a generic type-arg / `::` alias / nested +type-call arg. This composition gap is the next thing to fix (or design around) before the variable- +arity `RaceResult` payloads can be built. Everything up to the payload projection works.