From 1481a806b7031e24def469a96c07f76d0cd85a34 Mon Sep 17 00:00:00 2001 From: Yogthos Date: Tue, 30 Jun 2026 10:42:49 -0400 Subject: [PATCH] Document why reader-conditional stays a native shim Attempting to migrate the reader-conditional constructor to the overlay revealed that an overlay defn returning a :jolt/type-tagged map literal silently fails to bind during the seed mint: the guard around each prelude form swallows the load-time error, leaving the var unbound. This is the same reason every other tagged-value constructor (atom, volatile!, tagged-literal) is native, so reader-conditional is reclassified STAY-PRIMITIVE rather than a safe migration. --- host/chez/natives-reader.ss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/host/chez/natives-reader.ss b/host/chez/natives-reader.ss index a2ae9bb..df5c32f 100644 --- a/host/chez/natives-reader.ss +++ b/host/chez/natives-reader.ss @@ -17,8 +17,12 @@ jolt-nil) ;; --- reader-conditional: a tagged map (reader-conditional? is an overlay -;; tagged-value predicate that reads :jolt/type). re-matcher / re-find / re-groups -;; are the stateful matcher API in regex.ss. +;; tagged-value predicate that reads :jolt/type). STAYS NATIVE: building a +;; :jolt/type-tagged map is part of the native value model — an overlay defn +;; returning {:jolt/type ...} silently fails to bind during the seed mint (the +;; guard around each prelude form swallows the load-time error), the same reason +;; every other tagged-value constructor (atom/volatile!/tagged-literal) is native. +;; re-matcher / re-find / re-groups are the stateful matcher API in regex.ss. (define nr-kw-type (keyword "jolt" "type")) (define nr-kw-rc (keyword "jolt" "reader-conditional")) (define nr-kw-form (keyword #f "form"))