ns: accept vector reference clauses; add Compiler/specials
Two general fixes shaken out by clojure/tools.macro. - The ns macro now accepts a vector reference clause [:require …] / [:use …], not just the list form (:require …). Clojure dispatches on (first clause) and accepts both; jolt silently dropped vector clauses, so a ns written with them loaded with nothing required/used (tools.macro's test ns uses [:use …]). - clojure.lang.Compiler/specials is now a static whose keys are the special-form symbols (matching Clojure 1.2/1.3). Macroexpansion tooling reads (keys Compiler/specials) to know which heads not to expand. tools.macro itself isn't fully passing yet — its mexpand-all works, but the macrolet/symbol-macrolet tests need letfn to macroexpand to letfn* (jolt models letfn as a special form, not a macro over letfn*), so it stays off the list. make test green (+1 corpus row, 0 new divergences), shakesmoke byte-identical. One re-mint (the ns macro).
This commit is contained in:
parent
1ba79aa223
commit
192ef66e7e
4 changed files with 17 additions and 3 deletions
|
|
@ -3378,4 +3378,5 @@
|
|||
{:suite "numbers / unsigned-bit-shift-right is logical over 64 bits" :label "shift of a negative shifts in zeros" :expected "[9223372036854775807 4611686018427387902]" :actual "[(unsigned-bit-shift-right -1 1) (unsigned-bit-shift-right -8 2)]"}
|
||||
{:suite "numbers / ^long is 64-bit" :label "^long comparison on a full-width long" :expected "false" :actual "((fn* ([^long a ^long b] (< a b))) 9223372036854775807 1)"}
|
||||
{:suite "numbers / ^long is 64-bit" :label "^long quot on a full-width long" :expected "3074457345618258602" :actual "((fn* ([^long a] (quot a 3))) 9223372036854775807)"}
|
||||
{:suite "host-interop / Compiler" :label "Compiler/specials keys include the special forms" :expected "true" :actual "(every? (set (keys clojure.lang.Compiler/specials)) (quote [if do let* fn* quote def loop* recur try letfn* var]))"}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue