From f47f9ffe59530d4927b88c721e1b4e7044b2ce2d Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Mon, 14 Sep 2026 07:34:29 +0700 Subject: [PATCH] Two paragraphs in BUILT.md superseded in place, and the spike report says it is one BUILT.md appends and never dates, so a paragraph that was true when it was written reads as fact forever. Two are not: the map type spelling is (Map K V) and braces in type position are refused by name, and sand.flan has not called load-texture since it was cut back to port parity. Both get the parenthetical the FLAN_RAYLIB_H paragraph already got rather than an edit, since that is the convention the file has. SPIKE-GENERICS.md gets the treatment overview.md has: a header saying what it is and when it stopped being current. Its body stays. The two things in it that would now mislead are named there -- its account of what plan.org says, which plan.org has since overtaken, and the bare-t-at-every-use rule, which is narrower than what shipped, since (Option t) does not compile. --- docs/BUILT.md | 11 +++++++++++ docs/SPIKE-GENERICS.md | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/docs/BUILT.md b/docs/BUILT.md index ec6c5f0..6c92dae 100644 --- a/docs/BUILT.md +++ b/docs/BUILT.md @@ -2615,6 +2615,12 @@ allocation guard, so a `retry` re-attempts the allocation and not the expression literal's field list, and giving the same braces two meanings is what the colon-to-dot change was for. A map is built with `map-new` and filled with `put`. +*(Superseded on the first half only. `(Map K V)` is the type spelling and `{K V}` was withdrawn — braces in type +position are refused by name, because the brace's value and type meanings never corresponded the way the bracket's do +and `{}` in type position is wanted for anonymous struct types. The paragraph's actual subject is unchanged: there is +still no map literal, and a bare map form in expression position is still a struct literal's field list. See +`lib/parse.ml:68`.)* + ### The refusals, each by name - A **float key** — not a milestone question, which is why it is said separately. NaN is not equal to itself, and @@ -3847,6 +3853,11 @@ raylib to open. Pointing raylib at embedded bytes needs `LoadImageFromMemory` an `LoadTexture` — a raylib binding question, not an embedding one — so the flagship program is not yet asset-free on the web. The mechanism it needs is in. +*(Superseded by the cut. `sand.flan` was taken back from 765 lines to 206, to parity with the Clojure, Common Lisp and +jank ports, and the texture went with it — there is no `load-texture` call and no asset left to embed, only a +`brush-size` integer that kept the name. The binding question is still open for whatever wants it next; this program is +no longer the one asking it, and `brush.png` is now unreferenced.)* + ## `slurp`, `barf`, and the two ways they fail NEXT.md decisions 2 and 5. `(slurp path)` and `(slurp path allocator)` read a whole file into a `(Vec u8)`; diff --git a/docs/SPIKE-GENERICS.md b/docs/SPIKE-GENERICS.md index 8c04be8..ff80bbc 100644 --- a/docs/SPIKE-GENERICS.md +++ b/docs/SPIKE-GENERICS.md @@ -1,5 +1,16 @@ # The generics spike, answered: it runs, and the bill lands on the dev loop rather than on the checker +> **This is the spike report and it stopped being current when generics landed for real, on 2026-09-13.** +> It is kept because the measurements and the reasoning behind the design are still the ones that were +> acted on, but it describes a branch where `lib/prelude.ml` and the backends were untouched, and they +> are not any more: the prelude's per-type families collapsed into one function each. Two things it says +> have since been overtaken and would mislead anyone writing code from it. Its account of plan.org is out +> of date — plan.org now specifies `$t` itself rather than lowercase-with-no-sigil. And the spelling rule +> below is narrower than what shipped: `$t` is written wherever a *type* goes, including in a return type +> and nested inside `[$t]` or `(Option $t)`, and bare `t` only where a type's *name* is an argument in +> expression position, as in `(vec-new t)` and the cast `(t x)`. `(Option t)` does not compile. +> plan.org's Types section and spec-memory.md's Generics section are the current account. + Milestone 5's parametric polymorphism, run early and deliberately out of order, as a spike rather than as a decision. **Feasible, and smaller than expected.** A generic function written in Flan goes through the ordinary frontend, is instantiated at each concrete type its call sites ask for, is emitted as real functions and runs,