From 52a1ab5970899faba7125936766a9ca7cbad34c9 Mon Sep 17 00:00:00 2001 From: Yogthos Date: Sat, 20 Jun 2026 18:15:30 -0400 Subject: [PATCH] Chez parity: analyze any seq as a list form (macro/eval-built forms) (jolt-cf1q.7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hc-list? required cseq-list? (a reader-built list), so a form built at runtime via concat/map/cons — a lazy cseq with list?=#f — was rejected as "unsupported form". In Clojure any seq is a valid call form, so accept any cseq. Lights up macros that build their expansion with concat/list and (eval seq-form). zero-Janet 2692->2694, 0 new divergences; self-host + Janet gate + JVM cert green. jolt-cf1q.7 --- host/chez/host-contract.ss | 5 ++++- test/chez/run-corpus-zero-janet.janet | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/host/chez/host-contract.ss b/host/chez/host-contract.ss index 158a489..02a2375 100644 --- a/host/chez/host-contract.ss +++ b/host/chez/host-contract.ss @@ -38,7 +38,10 @@ ;; --- form predicates -------------------------------------------------------- (define (hc-sym? x) (symbol-t? x)) -(define (hc-list? x) (or (empty-list-t? x) (and (cseq? x) (cseq-list? x)))) +;; ANY non-empty seq is a list form for analysis (a macro/eval form built via +;; concat/map/cons is a lazy cseq with list?=#f, but evaluating it still means +;; calling its head) — not just reader-built lists (jolt-cf1q.7). +(define (hc-list? x) (or (empty-list-t? x) (cseq? x))) (define (hc-vec? x) (pvec? x)) (define (hc-map? x) (and (pmap? x) (jolt-nil? (jolt-get x hc-kw-jolt-type)))) ;; A set form is the reader's tagged map {:jolt/type :jolt/set :value } OR a diff --git a/test/chez/run-corpus-zero-janet.janet b/test/chez/run-corpus-zero-janet.janet index 4e85574..30b4c3e 100644 --- a/test/chez/run-corpus-zero-janet.janet +++ b/test/chez/run-corpus-zero-janet.janet @@ -219,7 +219,7 @@ # 2685; deftype (P. args) constructor via host-new var fallback -> 2688; # date/time (Date/Timestamp/SimpleDateFormat/TimeZone) + clojure.edn/read over a # reader -> 2692. -(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_ZJ_FLOOR") "2692"))) +(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_ZJ_FLOOR") "2694"))) (def floor (if (os/getenv "JOLT_CORPUS_LIMIT") 0 base-floor)) (when (or (> (length diverged) 0) (< pass floor)) (printf "REGRESSION: pass %d < floor %d or %d new divergence(s)" pass floor (length diverged)))