On Saturday, October 18, 2014 7:37:54 PM UTC-7, Dom Kiva-Meyer wrote:
You are resolving the protocol method symbol.
`(-invoke ...) expands to (your.namespace/-invoke ...)
To fix this, you need to quote (not syntax-quote) and unquote the symbol.
`(~'-invoke ...) expands to (-invoke ...)
Thanks, that's definitely a step in the right direction. It still doesn't work,
but there is now a function for arity 1 of invoke in the __proto__ map. There's
still a `true` value for cljs.core$ifn$-invoke however, which I'm guessing is
related to why it's not working.
I would desperately
Phew! Got it working. Thanks for your tip, Dom. For some reason I had the idea
that macros written for clojurescript needed to be expanded in a clojurescript
repl. Once I realised that was incorrect things became much easier. In the end
i just needed to also quote unquote the `IFn` protocol
I'm having real difficulty trying to write a macro that creates a defrecord
which implements certain protocols in Clojurescript.
I've created a minimal example project that shows the problem I'm having at
https://github.com/rsslldnphy/cljs-protocols-in-macros
The example has two records, one
You are resolving the protocol method symbol.
`(-invoke ...) expands to (your.namespace/-invoke ...)
To fix this, you need to quote (not syntax-quote) and unquote the symbol.
`(~'-invoke ...) expands to (-invoke ...)
Make liberal use of clojure.core/macroexpand, clojure.core/macroexpand-1,
and