From ade74649378f7cc01debde549809aee4ce6792fd Mon Sep 17 00:00:00 2001 From: Brummel Date: Thu, 14 May 2026 12:26:36 +0200 Subject: [PATCH] =?UTF-8?q?INDEX=20+=20roadmap:=20iter=20pd.1=20logged;=20?= =?UTF-8?q?prelude-decouple=20milestone=20moved=20P2=20=E2=86=92=20P0=20[~?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original "Prelude embed: Form-A as compile-time source" P2 entry removed; superseded by the wider "Prelude / core decoupling" P0 entry that now reflects the shipped β.2 loader-split shape and the three- iter sketch (pd.1 done, pd.2 + pd.3 to follow). --- docs/journals/INDEX.md | 1 + docs/roadmap.md | 80 ++++++------------------------------------ 2 files changed, 12 insertions(+), 69 deletions(-) diff --git a/docs/journals/INDEX.md b/docs/journals/INDEX.md index 170a1a4..a9ec90c 100644 --- a/docs/journals/INDEX.md +++ b/docs/journals/INDEX.md @@ -66,3 +66,4 @@ - 2026-05-14 — iter rpe.1: retire per-type io/print_int|bool|float; corpus migrated to polymorphic print → 2026-05-14-iter-rpe.1.md - 2026-05-14 — iter rpe.1.tidy: subst.rs preserves Type::Fn modes through rebuild → 2026-05-14-iter-rpe.1.tidy.md - 2026-05-14 — iter cli-diag-human: WorkspaceLoadError thru diagnostic in non-JSON CLI path → 2026-05-14-iter-cli-diag-human.md +- 2026-05-14 — iter pd.1: core API split — load_modules_with + build_workspace + implicit_imports threading; load_workspace_with kept as 3-line shim so surface unchanged; production literal-"prelude" count in workspace.rs dropped 8→4 → 2026-05-14-iter-pd.1.md diff --git a/docs/roadmap.md b/docs/roadmap.md index 23ab097..959d90f 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -35,9 +35,17 @@ work progresses. ## P0 — In flight -_(empty — canonical-type-names milestone closed 2026-05-11; Floats -closed 2026-05-10 and was removed once it stopped being load-bearing -context. Pick the next milestone from P1.)_ +- [~] **\[milestone\]** Prelude / core decoupling — retire + `examples/prelude.ail.json` + remove all literal-`"prelude"` strings + from `crates/ailang-core/src/`. Three iters: pd.1 (core API split, + shipped 2026-05-14), pd.2 (surface assumes ownership of prelude + embed + cross-form-identity preflight), pd.3 (delete the JSON + + carve-out cleanup). + - context: `docs/specs/2026-05-14-prelude-decouple.md`; per-iter + journals 2026-05-14-iter-pd.1 (and pd.2 / pd.3 to follow). Reframed + from the original "Prelude embed: Form-A as compile-time source" + P2 entry to widen scope from pure-embed-swap to full prelude- + decoupling of `ailang-core` (β.2 loader-split shape). ## P1 — Next @@ -137,72 +145,6 @@ context. Pick the next milestone from P1.)_ hits) by treating Form A as the privileged surface in the working tree, not just in flavour text. -- [ ] **\[milestone\]** Prelude embed: Form-A as compile-time source. - Retire `examples/prelude.ail.json` by switching the - `include_str!`-then-`serde_json::from_str` embed sites in - `crates/ailang-core/src/workspace.rs:417` and - `crates/ail/src/main.rs:474` to consume `examples/prelude.ail` - at compile time, parsed via `ailang_surface::parse`. After this - milestone the only surviving `.ail.json` carve-outs are the - seven subject-matter rejection fixtures (§C4 (a) of the - form-a-default-authoring spec); §C4 (b) becomes empty and is - removed from the spec. - - **Motivation.** The form-a-default-authoring milestone (just - closed) made `.ail` the authoring surface for every program in - the corpus, with one exception: the prelude. The prelude is - the language's most-read file and the canonical demonstration - of every language feature stacked into one module; that it is - the *one* file the user authors as `.ail.json` is a doctrine - inconsistency relative to CLAUDE.md "authors write `.ail`; the - build derives the JSON-AST in-process via `ailang_surface::parse`". - - **Problem.** `ailang-core` consumes the prelude at compile time - via `include_str!("../../../examples/prelude.ail.json")` plus - `serde_json::from_str`. Switching the embed to `prelude.ail` - requires parsing via `ailang_surface::parse`, but `ailang-core` - cannot import `ailang-surface` (the crate-cycle constraint - documented at `crates/ailang-surface/src/loader.rs:9-13` — - `ailang-surface` depends on `ailang-core` for the AST types). - The same embed exists at `crates/ail/src/main.rs:474`; that - site *can* import `ailang-surface` but is in lockstep with the - `ailang-core` one (both must reproduce the same `Module` value - for prelude semantics to be uniform between CLI dispatch and - workspace loading). - - **Resolution options** (decide at brainstorm time): - - (β) Split the workspace loader: move the prelude-injection - step from `ailang-core::load_workspace` to a new - `ailang-surface::load_workspace_with_prelude` (or wrapper). - `ailang-core` retains a prelude-free workspace primitive; - `ailang-surface` is the entry point that injects the parsed - prelude. Substantive refactor of ~3-5 sites. - - (γ) `build.rs` generates `examples/prelude.ail.json` at build - time from `examples/prelude.ail` via either an in-tree parser - (would re-create a similar crate-graph issue) or a snapshot - test that fails on drift. Avoids the loader-split but introduces - a build-time artefact and a bootstrap concern (the `ail` binary - itself is built from `ailang-core`). - - (δ) Some hybrid: prelude stays canonical as `.ail.json` in - storage but is rendered to `prelude.ail` at every commit by a - pre-commit hook; the dual-form is preserved as a lockstep - invariant rather than retired. Trades one inconsistency for - another but is the smallest change. - - **Carve-out today.** Per spec §C4 (b) (added 2026-05-13), - `prelude.ail.json` is the sole compile-time-embed carve-out - during the form-a-default-authoring milestone. `examples/prelude.ail` - already exists alongside it (rendered in iter form-a.0) as the - authoring surface; the dual-form for prelude is the symptom this - milestone exists to retire. - - - context: surfaced 2026-05-13 during iter form-a.1 recon; the - crate-cycle issue was not anticipated by the spec authors and - forced a brainstorm-level amendment to §C4. The fix exceeds - the form-a-default-authoring milestone's scope and is - sequenced as its own milestone to keep the architectural - change auditable in isolation. - - [ ] **\[feature\]** Operator routing through `Eq` / `Ord` — `==`, `<` etc. resolved via the typeclass instead of the built-in primitive comparators. No commitment; gated on bench re-baselining