Retranspile sx_ref.ml with mutable globals from transpiler

No more regex fixups for *strict* / *prim-param-types* — transpiler
handles reads (!_ref), writes (_ref :=), and defines natively.
2566/2568 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 14:04:40 +00:00
parent 1498cc2bdb
commit db1f7f1bfb

View File

@@ -296,18 +296,20 @@ and render_fn =
Nil
(* *strict* *)
and _strict_ = !_strict_ref
and _strict_ =
!_strict_ref
(* set-strict! *)
and set_strict_b val' =
_strict_ref := val'; Nil
let _strict_ = ref Nil in (_strict_ref := val'; Nil)
(* *prim-param-types* *)
and _prim_param_types_ = !_prim_param_types_ref
and _prim_param_types_ =
!_prim_param_types_ref
(* set-prim-param-types! *)
and set_prim_param_types_b types =
_prim_param_types_ref := types; Nil
let _prim_param_types_ = ref Nil in (_prim_param_types_ref := types; Nil)
(* value-matches-type? *)
and value_matches_type_p val' expected_type =