Ensure that arglists are quoted in the resulting code
This commit is contained in:
parent
db9f3b5209
commit
268e1cb598
1 changed files with 7 additions and 6 deletions
|
|
@ -455,7 +455,6 @@
|
||||||
(s/cat :arglist (s/coll-of simple-symbol? :kind vector?)
|
(s/cat :arglist (s/coll-of simple-symbol? :kind vector?)
|
||||||
:body (s/* any?)))))
|
:body (s/* any?)))))
|
||||||
|
|
||||||
;; TODO(Joshua): Finish this
|
|
||||||
(defmacro defcfn
|
(defmacro defcfn
|
||||||
{:arglists '([name docstring? symbol arg-types ret-type arglist & body])}
|
{:arglists '([name docstring? symbol arg-types ret-type arglist & body])}
|
||||||
[& args]
|
[& args]
|
||||||
|
|
@ -480,11 +479,13 @@
|
||||||
~(vary-meta (:name args)
|
~(vary-meta (:name args)
|
||||||
update :arglists
|
update :arglists
|
||||||
(fn [old-list]
|
(fn [old-list]
|
||||||
|
(list
|
||||||
|
'quote
|
||||||
(or old-list
|
(or old-list
|
||||||
(list
|
(list
|
||||||
(or (-> args :fn-tail :arglist)
|
(or (-> args :fn-tail :arglist)
|
||||||
(mapv (comp symbol name)
|
(mapv (comp symbol name)
|
||||||
(:native-arglist args)))))))
|
(:native-arglist args))))))))
|
||||||
~@(list (:doc args))
|
~@(list (:doc args))
|
||||||
fun#))))
|
fun#))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue