Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arglists metadata for ctor defined by defc* macros #60

Merged
merged 1 commit into from
Apr 20, 2016

Conversation

ajchemist
Copy link
Contributor

@ajchemist ajchemist commented Apr 20, 2016

for repl dev experience.

@tonsky
Copy link
Owner

tonsky commented Apr 20, 2016

Not sure how it works, but I emit def from defc, shouldn’t def take care of generating proper :arglists meta?

@ajchemist
Copy link
Contributor Author

ajchemist commented Apr 20, 2016

(set! *print-meta* true)

;; It seems followings are equivalent

(def ^{:arglists '([x] [x y])} a (fn ([x] :x) ([x y] :y)))
(:arglists (meta #'a))

(doto (def b (fn ([x] :x) ([x y] :y)))
  (alter-meta! assoc :arglists '([x] [x y])))
(:arglists (meta #'b))

(eval (list 'def (with-meta 'c {:arglists ''([x] [x y])}) '(fn ([x] :x) ([x y] :y))))
(:arglists (meta #'c))

;; and this is not

(def d (fn ([x] :x) ([x y] :y)))
(:arglists (meta #'d)) 

@ajchemist
Copy link
Contributor Author

@tonsky ping (force revision)

@ajchemist
Copy link
Contributor Author

ajchemist commented Apr 20, 2016

screen shot 2016-04-20 at 6 12 27 pm

@tonsky
Copy link
Owner

tonsky commented Apr 20, 2016

Yeah, that’s my bad — arglists is populated by defn, and I’m emiting def

On Wed, Apr 20, 2016 at 3:11 PM aJchemist [email protected] wrote:

[image: screen shot 2016-04-20 at 6 10 14 pm]
https://cloud.githubusercontent.com/assets/1694505/14669324/45ee317e-0723-11e6-9d28-52f07f13a85a.png


You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
#60 (comment)

@tonsky tonsky merged commit b06f8fc into tonsky:gh-pages Apr 20, 2016
@tonsky
Copy link
Owner

tonsky commented Apr 20, 2016

Released as 0.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants