Chez parity: analyze any seq as a list form (macro/eval-built forms) (jolt-cf1q.7)
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
This commit is contained in:
parent
01f49f50c3
commit
52a1ab5970
2 changed files with 5 additions and 2 deletions
|
|
@ -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 <pvec>} OR a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue