Chez parity: realized? on lazy-seq + conj! 1-arity identity

realized? threw 'not supported on' for a jolt-lazyseq record (the overlay
reads :jolt/type); add a jolt-lazyseq? arm to the post-prelude wrapper
reading the record's own realized? flag.

conj! 1-arity (conj! coll) is the transducer-completion arity and returns
coll as-is on the JVM, no transient check — we threw 'not a transient'.

Both gates: zero-janet 2696->2698, prelude 2649->2652, 0 new divergences.
This commit is contained in:
Yogthos 2026-06-20 19:40:05 -04:00
parent 32d2028559
commit 53a189541c
4 changed files with 24 additions and 11 deletions

View file

@ -62,9 +62,12 @@
(let ((overlay-realized? (var-deref "clojure.core" "realized?")))
(def-var! "clojure.core" "realized?"
(lambda (x)
(if (or (jolt-future? x) (jolt-promise? x) (jolt-delay? x))
(jolt-conc-realized? x)
(jolt-invoke overlay-realized? x)))))
(cond
((or (jolt-future? x) (jolt-promise? x) (jolt-delay? x)) (jolt-conc-realized? x))
;; a lazy-seq carries its own realized? flag (lazy-bridge.ss). The overlay
;; realized? reads :jolt/type and throws on a jolt-lazyseq record.
((jolt-lazyseq? x) (jolt-lazyseq-realized? x))
(else (jolt-invoke overlay-realized? x))))))
;; clojure.edn/read over a reader: the overlay edn.clj drain-reader uses janet/type;
;; the native Chez version (io.ss) drains the jhost reader instead (jolt-uicd/jolt-7t3l).
(def-var! "clojure.edn" "read"