Zulip Chat Archive
Stream: Is there code for X?
Topic: how to check attribute
Asei Inoue (May 30 2024 at 16:09):
@[ext] structure Point (α : Type) where
x : α
y : α
#check Point.ext
-- how to check `Point.ext` has attribute `ext`?
-- `Point.ext` is just an example; in general, I want to check whether an attribute is present or not.
Kyle Miller (May 30 2024 at 16:14):
Do you want a command to run as a user to check this? or are you looking for checking this programmatically in a metaprogram?
For the first, there's no pre-existing solution. I eventually want #print Point
to list the attributes associated to Point
.
Asei Inoue (May 30 2024 at 16:16):
Do you want a command to run as a user to check this? or are you looking for checking this programmatically in a metaprogram?
The latter, I guess.
Asei Inoue (May 30 2024 at 16:17):
It would be nice to have a built-in command like #synth
.
Last updated: May 02 2025 at 03:31 UTC