It looks like there isn't a way to get at the class behind a deftyped type other than constructing a dummy instance and taking its class, because the generated class has a gensymmed name. I was doing something where I needed to test when something was an instance of a deftype, so I added this to the `(do ...) block in deftype's implementation:
(defn ~(symbol (str name "?")) [x#] (instance? ~classname x#)) It would also be nice if the class itself was exposed under some standardized name, e.g. (symbol (str ~name "-class"))). Any reason this isn't done right now? -Per -- 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 To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.