Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pretty-print extensions for custom types #153

Open
sritchie opened this issue Nov 14, 2023 · 0 comments
Open

Add pretty-print extensions for custom types #153

sritchie opened this issue Nov 14, 2023 · 0 comments

Comments

@sritchie
Copy link
Member

sritchie commented Nov 14, 2023

Our types aren't caught by clojure.pprint now. We can fix this with an implementation like this example from Gen.clj:

(require '[clojure.pprint :as pprint])
(defmethod pprint/simple-dispatch Choice [^Choice c]
  #?(:clj (.write ^java.io.Writer *out* "#gen/choice ")
     :cljs (-write *out* "#gen/choice "))
  (pprint/simple-dispatch (.-v c)))
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

No branches or pull requests

1 participant