Comments (5)
These folders have HTML pages because there exists both a Lean file as well as a folder for them. In the case of Mathlib and Linarith:
- https://github.com/leanprover-community/mathlib4/blob/master/Mathlib/Tactic/Linarith.lean
- https://github.com/leanprover-community/mathlib4/blob/master/Mathlib.lean
The idea is that since Lean does transitive imports, even if the file is empty you might be interested in what it imports (which is the case here) because then you know what you are actually importing by importing this specific file. It could also be that this "folder file" does contain actual declarations etc. itself, for example the Lean code generator has a file like this: https://leanprover-community.github.io/mathlib4_docs/Lean/Compiler/LCNF/Simp.html
That being said I do also get annoyed a little by the arrow thing for sure. I wasn't quite sure how to make build it in a way so both things work so back at the time I decided to just leave it this way because you can both obtain the information and it is somewhat usable I guess, if someone has an idea for how to build this in a prettier way feel free to suggest it / send a PR.
from doc-gen4.
Aha, thanks! I still don't love this behaviour but I do now understand it.
In the case of the top-level folders (Mathlib, Std, etc) the set of imports contains no useful information, right? (because it is enforced to be everything?). So one could safely delete those links, which are also the worst offenders in blocking clickability.
I'm not sure what to do about the import-only files which function as the default import for an associated non-top-level folder. Indeed, maybe we can crowdsouce an idea for how to display this in a prettier way. I'll mention it on Zulip at some point (or feel free to preempt me).
from doc-gen4.
It is sadly not enforced what the top level files contain. In the case of Mathlib it is just made to be so with a script, in theory a user could hide modules from being imported by default without issues. They could also have declarations in the top level file without issues. Especially in single file libraries that only do something very small this might be the case.
from doc-gen4.
All good points. The best idea I can currently think of is to display it like
▸ Mathlib (file)
I started a Zulip discussion to solicit other ideas.
from doc-gen4.
Implemented as illustrated above, alternative implementations are still welcome!
from doc-gen4.
Related Issues (20)
- important type info is omitted HOT 3
- error: no such file or directory HOT 4
- ERROR: could not execute external process 'cc' HOT 2
- @[reducible] attributes are not shown HOT 1
- Hyperlinking not working when an up-arrow occurs before the declaration name
- Implement references / bibliography HOT 7
- Unclear error when running in a git repo without "origin" remote HOT 1
- Lean statement not rendered for theorems defined as `def thm : Prop := statement`
- Improve UX for long instance names HOT 1
- instances for vs instances mentioning
- Show data fields only to avoid "not rendered due to size" HOT 1
- Put inductive/structure documentation before field documentation HOT 3
- Auto-generated lemmas appear before declaration HOT 1
- De-indent comment block HOT 3
- Empty instances for HOT 1
- Escape sequences are handled incorrectly in LaTeX HOT 9
- Support for protected modifier
- auto-generated structure projections not appearing HOT 2
- noncomputable section isn't shown anywhere HOT 2
- Clicking links in the navbar or using the "Go to source" link produces an error in VS Code webviews
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doc-gen4.