Closed as not planned
Description
This feature has been proposed by SPJ during ZuriHac 2022.
Essentially, GHC has many Notes to explain the code-base, ghcide has these too, and they look like this:
{- Note [Avoiding bad interface files]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
-}
And these notes are often references in documentation for functions like this:
The issue is, that there is no way to actually find the note from the documentation without resorting to a basic grep search.
This UX is acceptable, but maybe we can do better!
The idea presenting here is the following:
- Inline the comment in the haddock documentation when displayed to the user
- Alternatively: Make the syntax
Note [Avoiding bad interface files]
clickable, allowing users to jump to the original note, allowing them to more easily discover the information.
As an alternative design space, maybe we can teach haddock in general about references to other comment sections?
Note: If standardised, this feature is useful for more than just the GHC codebase, but beneficial to the whole community.
Possible roadmap:
- Standardise the GHC Note system
- Figure out how to automatically create an index of available Notes in a local project.
- .hie files might provide this information, also haddock (which I think depends on .hie, right?).
- Find notes from dependencies
- again, .hie files or haddock.
- Display notes to users