Skip to content

Add pretty-print extensions for custom types #153

@sritchie

Description

@sritchie

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)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions