This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-11
Channels
- # announcements (16)
- # aws (17)
- # babashka (25)
- # beginners (60)
- # calva (40)
- # cider (3)
- # clara (4)
- # clj-kondo (24)
- # clojure (16)
- # clojure-austin (3)
- # clojure-dev (23)
- # clojure-europe (33)
- # clojure-nl (2)
- # clojure-norway (7)
- # clojure-uk (4)
- # clojurescript (39)
- # clr (108)
- # conjure (10)
- # cursive (12)
- # datalevin (7)
- # editors (2)
- # events (1)
- # fulcro (24)
- # graalvm (3)
- # introduce-yourself (8)
- # london-clojurians (2)
- # malli (18)
- # meander (6)
- # missionary (10)
- # nbb (16)
- # off-topic (19)
- # polylith (1)
- # portal (4)
- # rdf (1)
- # reitit (4)
- # remote-jobs (3)
- # shadow-cljs (10)
- # xtdb (12)
Any advice in how to teach cursive about how to resolve this macro?
(deflambda :a/keyword
{option-map}
[args]
body)
(defmacro deflambda
[dispatch-val metadata fn-binding & fn-body]
`(let [metadata# (assoc ~metadata :handler ~dispatch-val)]
(. ~(with-meta 'ductile.lambda/handle {:tag 'clojure.lang.MultiFn})
addMethod
~dispatch-val
(with-meta
(fn [req#] (enter-chain req# metadata# (fn [~@fn-binding] ~@fn-body)))
metadata#))))
> resolving it like a defn doesn't help unfortunately
well, it does not work because :foo/bar
is keyword not symbol...
Why not just accept a symbol? It can still be ns-qualified (nd since it's a macro, you can do whatever w/ it in the macro body)
I do that for some of my macros- cursive doesn't care if the symbol has a namespace, e.g.:
Is there currently any way to get Run test under carat in REPL
working with a defspec
test? I see this issue was closed: https://github.com/cursive-ide/cursive/issues/632. Resolving as deftest
doesn't seem to work