Fix r7rs.sx: remove guard macro (transpiler blocker), fix null?/boolean=?

guard macro expansion loops in the transpiled evaluator because
expand_macro→eval_expr→CEK can't handle let+first/rest in macro
bodies. Removed guard macro; will re-add as special form once
transpiler handles runtime AST construction (cons/append/make-symbol).

Fixed null? to handle empty lists (not just nil).
Fixed boolean=? to use = instead of undefined eq?.

2561/2568 tests pass (37 new vs baseline, 5 guard + 2 scope pending).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 10:20:31 +00:00
parent d4244b47bf
commit 3c419501e1
2 changed files with 4 additions and 14 deletions

View File

@@ -1159,8 +1159,8 @@ let run_spec_tests env test_files =
with e -> Printf.eprintf "Warning: %s: %s\n%!" name (Printexc.to_string e))
end
in
(* R7RS compatibility library — TODO: debug hang in transpiled eval *)
(* load_module "r7rs.sx" lib_dir; *)
(* R7RS compatibility library — minimal test version *)
load_module "r7rs.sx" lib_dir;
(* Render adapter for test-render-html.sx *)
load_module "render.sx" spec_dir;
load_module "canonical.sx" spec_dir;