                      (sort-by first data/total-order)
                      (map canonize-kv))]
     [:group
-     (delimiter "{")
+     (color-doc :delimiter "{")
      [:align (interpose [:span "," :line] entries)]
-     (delimiter "}")]))
+     (color-doc :delimiter "}")]))
 
 
 (defmethod canonize clojure.lang.IPersistentMap

                         (map canonize (rest s)))
                   (map canonize s))]
    [:group
     (delimiter "(")
     [:align (interpose :line elements)]
     (delimiter ")")]))


(defmethod canonize clojure.lang.IPersistentVector
  [v]
  [:group
   (delimiter "[")
   [:align (interpose :line (map canonize v))]
   (delimiter "]")])


(defmethod canonize clojure.lang.IPersistentSet
  [s]
  (let [entries (sort data/total-order (seq s))]
    [:group
     (delimiter "#{")
     [:align (interpose :line (map canonize entries))]
     (delimiter "}")]))


(defn- canonize-map

  (if *strict-mode*
    (throw (IllegalArgumentException.
             (str "No canonical representation for " (class r) ": " r)))
    [:span (color-doc :delimiter "#") (-> r class .getName) (canonize-map r)]))


(prefer-method canonize clojure.lang.IRecord clojure.lang.IPersistentMap)
