Skip to content

test(phel): add :phel branch for pr-str/prn-str character printing - #21

Merged
Chemaclass merged 1 commit into
mainfrom
feat/phel-pr-str-prn-str
Jul 17, 2026
Merged

Chemaclass merged 1 commit into
mainfrom
feat/phel-pr-str-prn-str

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

Phel now has pr-str/prn-str (phel-lang/phel-lang#2761). Phel has no character type, so \A / \space are single-character strings and print quoted ("A" / " ") — the same host model as the existing :cljs and :lpy (Basilisp) branches, not JVM's \A / \space.

Adds a :phel branch to pr_str.cljc and prn_str.cljc matching the :lpy string (quoted char, 17.0 float). Without it, Phel falls through to :default (JVM) and fails on the character elements.

Verified: Phel selects the :phel reader-conditional branch, and (pr-str nil "a" "string" \A \space 1 17.0 [:a :b] {:c :d} #{:e}) produces exactly the :phel/:lpy string.

Phel has no character type, so \A / \space are single-character strings
and print quoted ("A" / " "), matching the char-less-host branches
(:cljs, :lpy) rather than JVM's \A / \space.
@Chemaclass
Chemaclass merged commit fb73a48 into main Jul 17, 2026
4 checks passed
@Chemaclass
Chemaclass deleted the feat/phel-pr-str-prn-str branch July 17, 2026 06:56
Chemaclass added a commit to phel-lang/phel-lang that referenced this pull request Jul 17, 2026
Suite now carries a :phel reader-conditional branch for pr-str/prn-str
character printing (phel-lang/clojure-test-suite#21).

Related to #2743
Chemaclass added a commit to phel-lang/phel-lang that referenced this pull request Jul 17, 2026
* feat(core): add pr, prn, pr-str, prn-str readable-print family

Phel has no distinct char type, so character literals such as \A are
single-character strings and print readably as "A" (ClojureScript-aligned,
not Clojure/JVM's \A). Extracts a shared print-joined helper so print-str
and pr-str share the space-join loop.

Related to #2743

* test: bump clojure-test-suite pin for :phel pr-str/prn-str branch

Suite now carries a :phel reader-conditional branch for pr-str/prn-str
character printing (phel-lang/clojure-test-suite#21).

Related to #2743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant