-
Notifications
You must be signed in to change notification settings - Fork 103
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
feat: add #help note
command
#948
feat: add #help note
command
#948
Conversation
remove trailing whitespace
awaiting-review |
Mathlib CI status (docs):
|
The Mathlib test PS: Thank you for being the first live test of this new Batteries feature that checks whether a Batteries PR will break Mathlib downstream! |
when writing this PR i certainly did not take this in consideration, so it was not something i was expecting... |
Indeed, that is a poorly designed test. On the other hand, that test's output shows that |
i guess it could be a |
Actually, it makes sense to move |
The |
wip |
awaiting-review |
Co-authored-by: François G. Dorais <[email protected]>
This is looking excellent and it now passes Mathlib CI! One final thing: the command should be in Batteries.Tactic.HelpCmd along with the other |
in my opinion, it is more natural to have the tool here, in order to make sure it is available wherever library notes are... |
In any case, the module doc at Batteries.Tactic.HelpCmd needs to be updated. I don't understand why you claim it's not a help command. Just like the other help commands, it's handy for users when writing code but it is not useful as code. That's why HelpCmd is not imported anywhere in Batteries and Mathlib except in the global import files. I don't see why |
I'm afraid I must insist on moving to Batteries.Tactic.HelpCmd for maintainability reasons. Your proposed alternative has some issues (1) importing Batteries.Tactic.HelpCmd doesn't import all help commands and (2) importing Batteries.Util.LibraryNotes into Batteries.Tactic.HelpCmd would not pass shake. I see no more practical way around these problems. |
@fgdorais how about we put an alias of the command in |
That's too hacky for Batteries. Like I said before the reason why help commands like this one aren't available everywhere is that they are only useful for users while writing code, but of no use in the code itself. You will just have to get used to importing help commands while writing a Batteries or Mathlib PR and then deleting the import before submitting. |
awaiting-review |
i don't see the issue with having this command always available. AFAIK, it shouldn't be that impactful if these are or aren't imported. |
FWIW, I think Batteries.Tactic.HelpCmd would be a nice addition to Mathlib.Init. |
Co-authored-by: François G. Dorais <[email protected]>
4d2cb85
on zulip it was mentioned that there used to be an easy way to find and/or read library notes, but that this feature no longer works, presumably since lean4.
This PR aims to remedy the situation by introducing the
#help note "some tag"
command, which displays all library notes marked with the tag "some tag" that are declared before the command, including in imports.