GithubHelp home page GithubHelp logo

Comments (5)

hargoniX avatar hargoniX commented on July 22, 2024

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:

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.

hrmacbeth avatar hrmacbeth commented on July 22, 2024

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.

hargoniX avatar hargoniX commented on July 22, 2024

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.

hrmacbeth avatar hrmacbeth commented on July 22, 2024

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.

hargoniX avatar hargoniX commented on July 22, 2024

Implemented as illustrated above, alternative implementations are still welcome!

from doc-gen4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.