Zulip Chat Archive

Stream: metaprogramming / tactics

Topic: get attributes on decl


Johan Commelin (Nov 11 2021 at 10:00):

Given some environment e and a declaration d, how do you get all attributes on d?

Scott Morrison (Nov 11 2021 at 10:21):

I suspect you're going to have to come up with a list of all attributes, and check which ones point to d. :-(

Mario Carneiro (Nov 11 2021 at 10:32):

I just checked, and this is how #print works as well, it just goes through the list of all attributes and sees which ones d subscribes to

Mario Carneiro (Nov 11 2021 at 10:35):

unfortunately, the relevant function, get_attributes, is not exposed to lean

Johan Commelin (Nov 11 2021 at 10:40):

How hard would it be to expose it?


Last updated: Dec 20 2023 at 11:08 UTC