Fix home-stepper paren bugs, harden defisland multi-body, add SX Tools essay

Two paren bugs in home-stepper.sx caused the home page to render blank:

1. Line 222 had one extra ) that prematurely closed the letrec bindings
   list — rebuild-preview and do-back became body expressions instead
   of bindings, making them undefined in scope.

2. Lines 241-308 were outside the let/letrec scope entirely — the outer
   let closed at line 240, so freeze-scope, cookie restore, source
   parsing, and the entire div rendering tree had no access to signals
   or letrec functions.

Also hardens defisland to wrap multi-expression bodies in (begin ...),
matching the Python-side fix from 9f0c541. Both spec/evaluator.sx and
the OCaml transpiled sx_ref.ml are updated.

Adds SX Tools essay under Applications — the revised plan for structural
tree reading/editing tools for .sx files, motivated by this exact bug.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 17:52:16 +00:00
parent 1777f631a5
commit c18f46278f
6 changed files with 223 additions and 8 deletions

View File

@@ -468,6 +468,11 @@
'(~sx-pub/overview-content)
nil)))
;; SX Tools (under applications)
(define sx-tools
(fn (slug)
'(~sx-tools/overview-content)))
;; Essays (under etc)
;; Convention: ~essays/{slug}/essay-{slug}
(define essay