I have a deftype that supports with-meta, but I can't figure out how to
support caret reader syntax.

To support with-meta, I include a "meta" field and implement IObj methods
"meta" and "withMeta".  Seems to work just fine:

    (with-meta (entity-map [:A/B] {:a 1})  {:foo "metadata here"})

But this doesn't work:  ^{:foo "metadata there"}(entity-map [:A/B] {:a 1})

In LispReader.clj it looks to me like the MetaReader checks to see if
object is instanceof IMeta, ISeq (so it can call assoc) and IReference (so
it can call resetMeta).  My deftype supports both of those interfaces, but
the methods are not called when I construct an object using caret syntax,
as above.

Can anybody shed some light on this?

Thanks,

Gregg

-- 
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.

Reply via email to