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

auto-generated structure projections not appearing #184

Open
fpvandoorn opened this issue May 14, 2024 · 3 comments
Open

auto-generated structure projections not appearing #184

fpvandoorn opened this issue May 14, 2024 · 3 comments

Comments

@fpvandoorn
Copy link

e.g. CommMonoid.toMonoid.
These are useful to see (also in the instances for Monoid).

@hargoniX
Copy link
Collaborator

They're currently not printed on purpose as they do not exist in the code that is typed but are rather implicitly introduced by the extends thing (which is rendered). My current philosophy for how the docs should look like is "as close as possible to the original code" but if there are enough people that believe this should be different I'm happy to change it.

@fpvandoorn
Copy link
Author

fpvandoorn commented May 15, 2024

That is fair. I don't actually feel strongly about seeing the declaration.

However, I think the following three things are important:

  • Occurrences of CommMonoid.toMonoid in the doc should be a hyperlink to CommMonoid
  • CommMonoid.toMonoid should show up in the search results, linked to CommMonoid.
  • CommMonoid.toMonoid should be included in "computed" data, such as in the list of instances for Monoid.

EDIT:
And the following two links should jump to CommMonoid in the doc/source:
https://leanprover-community.github.io/mathlib4_docs/find/?pattern=CommMonoid.toMonoid#doc
https://leanprover-community.github.io/mathlib4_docs/find/?pattern=CommMonoid.toMonoid#src

@kmill
Copy link
Contributor

kmill commented Nov 14, 2024

Does docgen have some sort of aliasing system? For subobject projections and parent projections, we could alias them to the structure itself.

Aliases could help with #222 as well, where we'd look for all exported aliases (in the Lean sense) and add them as aliases in the docgen sense. Given a docgen alias name -> canonicalName, we'd have both name and canonicalName indexed, but only canonicalName would be included in the documentation itself.

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

No branches or pull requests

3 participants