You may overwrite the default IPrintWriter by doing calling extend-type after the defrecord.
But CLJS should probably allow the protocol in defrecord itself instead of forcing the default. Not sure if there is an open issue for it. On Friday, November 11, 2016 at 9:29:25 PM UTC+1, William la Forge wrote: > > To answer my own question, it is because IPrintWithWriter is already > defined for records. Only define this with deftype. > > On Friday, November 11, 2016 at 3:16:46 PM UTC-5, William la Forge wrote: >> >> WARNING: Protocol IPrintWithWriter implemented multiple times at line 9 >> src\simpleArk\rolonRecord.cljc >> >> Any ideas? >> >> (ns simpleArk.rolonRecord) >> >> >> #?(:clj >> (defrecord Rolon-record [rolon-uuid]) >> :cljs >> (defrecord Rolon-record [rolon-uuid] ;;this is line 9 >> IPrintWithWriter >> (-pr-writer [this writer opts] >> (let [pr-pair (fn [keyval] >> (pr-sequential-writer writer >> pr-writer "" " " "" opts keyval))] >> (pr-sequential-writer writer pr-pair >> "#ark/Rolon-record {" >> ", " >> "}" >> opts this))))) >> >> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.