● All three issues are fixed, tested, and verified end-to-end. Full workspace test #34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-31-32-33"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
suite passes (24 test binaries, 0 failures) and clippy is clean.
#31
#32
#33
Summary
#31 — functor/3 construct aliased all arg slots (termops.rs)
The construct loop called m.new_var() (which pushes its own self-ref cell) and then
pushed the returned ref again, laying down two cells per slot so every later arg
aliased the first variable. Now it writes a self-referencing REF directly into each
contiguous arg cell.
#32 — whole floats lost .0 in write/1 (render.rs)
term_to_string (used by write/1 and the binding display) formatted floats with raw
{}; render.rs already had the correct fmt_float helper and term_to_json used it.
Routed term_to_string through fmt_float too.
#33 — missing /1 evaluable and writeq/1
(arith.rs). X is \ 0 → -1, \ 5 → -6. The operator already parsed; only evaluation
was missing.
term_to_string_quoted + atom_is_unquoted/quote_atom), wired through the runtime
impl (miscops.rs), the shared vocabulary (builtins.rs), the compiler symbol map
(lower.rs), the runtime metacall dispatch (control.rs), and the reference doc.
writeq(foo) → foo, writeq('hello world') → 'hello world'.
On ordering: #31 was fully independent; #32 landed before #33 so writeq inherited
correct float rendering through the shared writer. Each came with a regression test
pinning the issue's exact reproduction.
Review: all three issues fixed and verified end-to-end ✅ (one minor follow-up)
Reviewed the full diff and verified every fix against the original issue
reproductions on a build of this branch (
fd4b864).#31 —
functor/3construct ✅Correct root-cause fix: replaces
new_var()(which double-pushed a cell andaliased every argument slot to one variable) with a self-referencing
REFwritten directly into each contiguous arg cell. The regression test asserts both
distinct vars and the behavioral
T = point(3, 4)binding.#33 —
\/1+writeq/1✅\/1is!n, integer-only (errors on float viaint_args_required— correct,ISO
\/1is integer-only).writeq/1is wired through every registration pointconsistently (codegen
DET_BUILTINS,det_builtindispatch,vocab_invariant,shared roster 55→56 / Det 25→26), with thorough quoting logic and tests.
#32 —
write/1whole-valued floats ✅ (with a gap, below)Routes the
term_to_stringfloat branch through the existingfmt_float(whichalready forced
.0, and whichterm_to_jsonalready used). Minimal and correct.Minor follow-up (non-blocking): #32 misses the error-message path
fmt_floatnow coversterm_to_stringandterm_to_json, butformat_term_v(
render.rs, the byte contract for error messages) still uses rawf64::to_string(), which drops the.0. So a whole float embedded in an errorterm reintroduces exactly the "indistinguishable from an integer" problem #32
fixes:
Cosmetic (error messages only), so not a merge blocker — but routing that last
TAG_FLTbranch throughfmt_floatwould make all float rendering consistent.Everything else — code quality, regression test coverage, doc updates
(
builtin-reference.md, roster counts) — is clean. Nice work.