From 5c07f437133ff4dde54bb4d2e58895a5f0cf60d9 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Wed, 18 May 2022 18:32:15 -0400 Subject: [PATCH] pprint refs --- src/ludus/show.clj | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ludus/show.clj b/src/ludus/show.clj index 05b776a..040a903 100644 --- a/src/ludus/show.clj +++ b/src/ludus/show.clj @@ -12,18 +12,21 @@ (defn- show-map [v] (cond - (or (= (::data/type v) ::data/fn) - (= (::data/type v) ::data/clj)) - (str "fn " (:name v)) + (or (= (::data/type v) ::data/fn) + (= (::data/type v) ::data/clj)) + (str "fn " (:name v)) (= (::data/type v) ::data/ns) (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) (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 (str "#{" (apply str (into [] show-keyed v)) "}")