pprint refs
This commit is contained in:
parent
9df37cca4d
commit
5c07f43713
|
@ -12,18 +12,21 @@
|
||||||
|
|
||||||
(defn- show-map [v]
|
(defn- show-map [v]
|
||||||
(cond
|
(cond
|
||||||
(or (= (::data/type v) ::data/fn)
|
(or (= (::data/type v) ::data/fn)
|
||||||
(= (::data/type v) ::data/clj))
|
(= (::data/type v) ::data/clj))
|
||||||
(str "fn " (:name v))
|
(str "fn " (:name v))
|
||||||
|
|
||||||
(= (::data/type v) ::data/ns)
|
(= (::data/type v) ::data/ns)
|
||||||
(str "ns " (::data/name v) " {"
|
(str "ns " (::data/name v) " {"
|
||||||
(apply str (into [] show-keyed (dissoc v ::data/struct ::data/type ::data/name)))
|
(apply str (into [] show-keyed (dissoc v ::data/struct ::data/type ::data/name)))
|
||||||
"}")
|
"}")
|
||||||
|
|
||||||
(::data/struct v)
|
(::data/struct v)
|
||||||
(str "@{" (apply str (into [] show-keyed (dissoc v ::data/struct))) "}")
|
(str "@{" (apply str (into [] show-keyed (dissoc v ::data/struct))) "}")
|
||||||
|
|
||||||
|
(::data/ref v) ;; TODO: reconsider this
|
||||||
|
(str "ref:" (::data/name v) " <" (deref (::data/value v))">")
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(str "#{" (apply str (into [] show-keyed v)) "}")
|
(str "#{" (apply str (into [] show-keyed v)) "}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user