Note that macroexpand won't show the meta data so you will need to note the effect some other way (e.g. by running it).
On 23 March 2015 at 08:00, Colin Yates <[email protected]> wrote: > `(do > (schema.core/defn > ~(with-meta 'create {:always-validate true}) > ... > > worked for me. > > On 23 March 2015 at 07:58, Mike Thompson <[email protected]> wrote: >> I have a macro: >> >> (defmacro m >> [x] >> `(if-not ^boolean js/goog.DEBUG ~x)) ;;; NOTICE the type hint >> >> >> I use it: >> >> (macroexpand-1 '(m blah)) >> ;; => (clojure.core/if-not js/goog.DEBUG blah) >> >> Notice how the type hint is gone. But I need that type hint there otherwise >> the if test on js/goog.DEBUG doesn't work. >> >> If I put this in: >> (set! *print-meta* true) >> >> then I can see the type hint metadata in there, just not available somehow >> >> So ... I'm stuck. Google searches show up some talk about using "with-meta" >> but I can't seem to make that work either. >> >> Any help with the correct magic appreciated. >> >> -- >> Mike >> >> >> >> >> >> >> -- >> Note that posts from new members are moderated - please be patient with your >> first post. >> --- >> You received this message because you are subscribed to the Google Groups >> "ClojureScript" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/clojurescript. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
