Phase 14 fixes: pr-str mapping, every-pred, PLAN.md update
- compiler.janet: fix core-pr-str mapping — was pointing to core-str (line 221) - core.janet: add core-pr-str (string/format-based serialization with proper quoting), add core-every-pred (variadic predicate composition), wire both into core-bindings - cljs-port-5.janet: restore var-dynamic? test, with-meta preserves test, add pr-str keyword and every-pred assertions - PLAN.md: update to current state — all phases 0-14 checked off, 316/317 316 ok, 1 fail (pre-existing, unchanged)
This commit is contained in:
parent
6b0fdefc61
commit
84d92c1008
6 changed files with 136 additions and 37 deletions
|
|
@ -1,5 +1,3 @@
|
|||
Janet `and` returns last truthy value, not boolean. `(and table? deftype)` returns the deftype string, not true. Predicate-like functions (core-map?, core-contains?, etc.) that check type tags via `(and ...)` must wrap in `(if ... true false)`. Hit us with core-map? returning the deftype string instead of boolean true for record instances. Also hit type-satisfies? which had to replace `(boolean ...)` (nonexistent) with `(if ... true false)`.
|
||||
§
|
||||
Janet `and` returns last truthy value, not boolean. `(and table? deftype)` returns the deftype string, not true. Predicate-like functions (core-map?, core-contains?, etc.) that check type tags via `(and ...)` must wrap in `(if ... true false)`. Examples: core-map? returning deftype string instead of boolean true for record instances. Also applies to type-satisfies? which must use `(if (and ...) true false)` — Janet has no `boolean` function.
|
||||
§
|
||||
Clojure .clj source files loaded via eval-form cannot have docstrings. If a defn form has 5 elements (defn, name, docstring, params, body), the evaluator's defn macro handler gets 4 args instead of 3, breaking with "macro arity mismatch". All .clj files in src/jolt/clojure/ must use 4-element defn forms: (defn name [params] body). Docstrings on defn are a Clojure feature not supported by Jolt's defn macro.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue