Re: defmacro help

2015-03-13 Thread Colin Yates
Thanks Tobias. The complete macro body is now: (let [{:keys [hierarchy-key cascade-keys define-command-schema defined-event-schema define-command-key defined-event-key]} (default-options aggregate)] `(do (schema.core/def

Re: defmacro help

2015-03-13 Thread Tobias Kortkamp
> then the error is on the (schema.core/defn) call. But notice the fully > qualified 'create' - I want 'create' to be a literal in the namespace of > the caller, not the namespace the macro is defined in. > > Any ideas? Quote-unquote the symbol: ~'create Example: `(defn create []) => (clojure

Re: defmacro help

2015-03-13 Thread Colin Yates
OK, so ~(symbol "create") was what I needed to do but that now loses the ^:always-validate meta :).. On Friday, 13 March 2015 12:42:36 UTC, Colin Yates wrote: > > Nope, never mind - it was a dirty REPL. It works fine-ish. > > My next problem is that it works fine, but only if I call it in the >

Re: defmacro help

2015-03-13 Thread Colin Yates
Nope, never mind - it was a dirty REPL. It works fine-ish. My next problem is that it works fine, but only if I call it in the namespace it is defined in. If I call it in another namespace I get the following error: Error refreshing environment: java.lang.RuntimeException: Can't refer to quali