jolt/test/spec
Yogthos ad84b2904f core: fn param + loop destructuring, compiled (matching Clojure)
fn now desugars destructuring params like Clojure's maybe-destructured: each
non-symbol param becomes a gensym and the body is wrapped in a let that rebinds the
pattern, so fn* only ever sees plain params and the COMPILER handles it (it rejected
patterns before, falling back to the interpreter). loop follows Clojure too: gensym
one loop var per binding, loop* over those, destructure via an inner let, with an
outer let so later inits see earlier destructured names — recur arity stays correct.

Two representation gotchas: build the param/binding vectors via [~@..] so they're
tuple forms (conj yields a pvec the analyzer rejects), and use (symbol (str
(gensym))) since a bare (gensym) in an overlay macro body is a Janet symbol the
destructurer rejects.

Closes the fn/loop destructuring gaps. conformance 228x3, fixpoint, clojure-test-
suite 3930, full suite green, bench flat.
2026-06-07 18:55:56 -04:00
..
control-flow-spec.janet core: move for to the syntax tier (and fix multi-group :when) 2026-06-07 16:55:21 -04:00
core-async-spec.janet feat: core.async Phase 3 — channel transducers + dropping/sliding buffers 2026-06-05 15:40:24 -04:00
destructuring-spec.janet core: fn param + loop destructuring, compiled (matching Clojure) 2026-06-07 18:55:56 -04:00
exceptions-spec.janet test: fold ported-clojure batteries into spec 2026-06-05 07:50:16 -04:00
functions-spec.janet test(spec): control-flow, functions, destructuring — fix loop destructuring 2026-06-05 00:16:15 -04:00
futures-spec.janet feat: futures on real OS threads (ev/thread) 2026-06-05 20:00:11 -04:00
host-interop-spec.janet test: cover the janet interop bridge and nREPL var rendering 2026-06-05 21:43:15 -04:00
lazy-seqs-spec.janet test: fold phase ports into spec; promote compile-mode test 2026-06-05 01:07:09 -04:00
lists-spec.janet test(spec): collections contract (sequences, vectors, lists, maps, sets) 2026-06-05 00:08:37 -04:00
macros-spec.janet core: move binding macro to overlay 2026-06-07 01:13:22 -04:00
maps-spec.janet test: lock in nil-valued map preservation (jolt-c7h) 2026-06-06 22:35:26 -04:00
metadata-spec.janet spec: regression cases for with-meta nil and multi-coll map nil elements 2026-06-06 19:52:54 -04:00
multimethods-spec.janet test: fold phase ports into spec; promote compile-mode test 2026-06-05 01:07:09 -04:00
namespaces-spec.janet fix: catch binds unwrapped thrown value; var-set targets thread binding 2026-06-05 01:23:52 -04:00
nrepl-spec.janet feat(nrepl): nREPL server + client in Clojure on a Janet interop bridge 2026-06-05 21:25:23 -04:00
numbers-spec.janet feat(strictness): numeric ops reject non-numbers/non-integers like Clojure 2026-06-05 10:58:21 -04:00
predicates-spec.janet test: regression coverage for the core migration + the two bug fixes 2026-06-06 23:51:13 -04:00
protocols-spec.janet test: fold phase ports into spec; promote compile-mode test 2026-06-05 01:07:09 -04:00
reader-syntax-spec.janet reader: one-char literals for non-symbol chars (\{ \( \, \%) 2026-06-06 00:10:17 -04:00
sequences-spec.janet core: move dedupe + seq-to-map-for-destructuring to overlay (+ tests) 2026-06-07 00:14:40 -04:00
sets-spec.janet fix: value-semantics for collection keys/elements; set literals evaluate 2026-06-05 01:02:00 -04:00
state-spec.janet test: fold ported-clojure batteries into spec 2026-06-05 07:50:16 -04:00
strings-spec.janet fix: pr-str/str of a var, and nREPL namespace switching 2026-06-05 22:05:45 -04:00
transducers-spec.janet fix: transducers/reduce short-circuit over infinite seqs via reduced 2026-06-05 09:18:35 -04:00
transients-spec.janet feat(strictness): subs validates bounds; assoc! bounds-checks vector index 2026-06-05 14:07:14 -04:00
truthiness-spec.janet test: fold ported-clojure batteries into spec 2026-06-05 07:50:16 -04:00
vectors-spec.janet compiler: IFn collections held in a var/local are callable (jolt-vh5) 2026-06-06 20:03:49 -04:00