spec: floats milestone — Float as IEEE-754 binary64 primitive
This commit is contained in:
+21
-12
@@ -33,23 +33,32 @@ work progresses.
|
||||
|
||||
## P0 — In flight
|
||||
|
||||
- [x] **\[milestone\]** design-md-consolidation — `docs/DESIGN.md`
|
||||
is now a state-only specification across four thematic sweeps
|
||||
(history anchors out, REVERTED + migration plans out,
|
||||
schema-SoT inversion + data-model hardening, workflow /
|
||||
cross-reference cleanup). Closed 2026-05-10.
|
||||
- context: `docs/specs/2026-05-10-design-md-consolidation.md`,
|
||||
JOURNAL milestone-close entry of same date.
|
||||
- [~] **\[milestone\]** Floats — introduce `Float` as IEEE-754
|
||||
binary64 primitive type. One float type only (no `f32`).
|
||||
IEEE-conformant equality: `eq : Float → Float → Bool` returns
|
||||
`false` for `NaN == NaN`; **no `Eq` instance** (the partiality
|
||||
is real and surfaces through `Maybe`-shaped comparators rather
|
||||
than through a lying total instance). `Ord` likewise partial:
|
||||
`compare : Float → Float → Maybe Ordering`. Includes literal
|
||||
syntax in Form-A + Surface, codegen for arithmetic ops,
|
||||
conversions Int↔Float, and `Show`-style printing without the
|
||||
typeclass machinery (the typeclass wiring lands in Post-22
|
||||
Prelude).
|
||||
- context: this conversation (2026-05-10) — Float status quo
|
||||
was "documented as a primitive but never implemented";
|
||||
`crates/ailang-core/src/canonical.rs:14` says "no floats".
|
||||
|
||||
## P1 — Next
|
||||
|
||||
- [ ] **\[milestone\]** Post-22 Prelude — ship `Show` / `Eq` / `Ord`
|
||||
with the four primitive instances (Int, Bool, Str, Float); rewire
|
||||
`print` through `Show.show`. Originally queued as 22b.4 in the
|
||||
typeclass milestone, kept on hold pending demand.
|
||||
with the three total-orderable primitive instances (Int, Bool, Str);
|
||||
rewire `print` through `Show.show`. Float gets `Show` but **not**
|
||||
`Eq` / `Ord` (partial — see Floats milestone). Originally queued
|
||||
as 22b.4 in the typeclass milestone, kept on hold pending demand.
|
||||
- context: JOURNAL 2026-05-09 ("JOURNAL queue")
|
||||
- depends on: design-md-consolidation (touches DESIGN.md schema
|
||||
sections that the consolidation will reshape)
|
||||
- depends on: Floats (the partial-Eq/Ord story for Float must be
|
||||
settled before the Prelude classes ship, so the Prelude can
|
||||
decide what's instanced and what isn't)
|
||||
|
||||
## P2 — Medium-term
|
||||
|
||||
|
||||
Reference in New Issue
Block a user