Zulip Chat Archive
Stream: lean4
Topic: No deprecation warning in #check
Thomas Zhu (Oct 28 2024 at 17:18):
Is this expected behavior?
@[deprecated] def A := Unit
-- no warning
#check A
-- deprecation warning
#check List A
-- deprecation warning
#reduce A
Thomas Zhu (Oct 28 2024 at 17:20):
Similarly, (I don't know if related):
def A := Unit
def B.A := Unit
open B
-- no error
#check A
-- error: ambiguous
#check List A
-- error: ambiguous
#reduce A
Kyle Miller (Oct 28 2024 at 17:23):
#check ident
is special, it doesn't elaborate the identifier. This is why #check ident
and #check (ident)
give different outputs. The second elaborates (ident)
as a term, and the first provides a nicely pretty printed function signature.
Kyle Miller (Oct 28 2024 at 17:25):
It seems reasonable to provide a deprecation warning; it just needs to be coded for this case. Maybe make a Lean 4 issue?
Thomas Zhu (Oct 28 2024 at 17:57):
Ok, that makes sense. I will make an issue later
Thomas Zhu (Oct 29 2024 at 03:55):
Ok, that makes sense. I will make an issue later
Last updated: May 02 2025 at 03:31 UTC