evaluator.sx defines *custom-special-forms* and register-special-form! which shadow the host's native bindings when loaded at runtime. The native bindings route to Sx_ref.custom_special_forms (the dict the CEK evaluator checks), but the SX-level defines create a separate dict. Fix: rebind_host_extensions runs after every load command, re-asserting the native register-special-form! and *custom-special-forms* bindings. Add regression test: custom form registered before evaluator.sx load survives and remains callable via CEK dispatch afterward. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6.0 KiB
Executable File
6.0 KiB
Executable File