auto-generated structure projections not appearing
e.g. CommMonoid.toMonoid.
These are useful to see (also in the instances for Monoid).
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.
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.toMonoidin the doc should be a hyperlink toCommMonoid CommMonoid.toMonoidshould show up in the search results, linked toCommMonoid.CommMonoid.toMonoidshould be included in "computed" data, such as in the list of instances forMonoid.
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
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.