Hi John,

The type hint ^long expands to ^{:tag long}.

So something like this should do the trick (untested).

(defmacro aTest []
  `(~'defn ~'aFun [^{:tag '~'long ~'b ]  (meta ~'b) ))

Thanks,
Ambrose

On Wed, Jul 18, 2012 at 7:55 PM, john <john.vie...@gmail.com> wrote:

> Hello,
> how do I get primitive typ hints to appear in the output of a macro?
>
> like :
> (defmacro aTest []
>   `(~'defn ~'aFun [^long ~'b ]  (meta ~'b) ))
>
> (macroexpand-1 '(aTest))
> yields :
>
> (aFun 7)
> (macroexpand-1 '(aTest))
> yields :
>
> (defn aFun [b] (clojure.core/meta b))
>
> but I wold like it to be :
> (defn aFun [^long b] (clojure.core/meta b))
>
> Many greetings
> John
>
>
>
> --
> 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 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

Reply via email to