Fix callable? type mismatch, restore 20 HS test regressions, add host-* server stubs

callable? in boot-helpers.sx checked for "native-fn" but type-of returns
"function" for NativeFn — broke make-spread and all native fn dispatch
in aser. Restore 20 behavioral tests replaced with NOT IMPLEMENTED stubs
by the test regeneration commit. Add host-* platform primitive stubs to
sx_server.ml so boot-helpers.sx loads without errors server-side.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-16 22:15:55 +00:00
parent 76f7e3b68a
commit 8c85e892c2
8 changed files with 2427 additions and 1975 deletions

View File

@@ -368,6 +368,9 @@ let cek_run_with_io state =
loop ()
(** IO-aware eval_expr — like eval_expr but handles IO suspension. *)
(* IO-aware eval — used by site_mode. The regular file loading path
uses Sx_ref.eval_expr which delegates IO suspension to the
_cek_io_suspend_hook → _vm_suspension_to_dict chain. *)
let _eval_expr_io expr env =
let state = Sx_ref.make_cek_state expr env (List []) in
cek_run_with_io state