Documenting GHC: blogs, wiki pages, Notes, Haddocks, etc

Ben Gamari ben at smart-cactus.org
Tue Sep 14 17:04:03 UTC 2021


Sebastian Graf <sgraf1337 at gmail.com> writes:

> What I don't like:
>
>    - I can't refer to $chunk from other modules
>    - Everywhere I reference $chunk in a haddock, it gets inlined instead of
>    appearing with its title or inserting a link with the section name it is
>    currently decoupled from.
>
It seems like we could easily fix both of these with a simple change to
Haddock: don't inline chunks except in references in the export list
(which determine where the chunk will be placed in the output) and
ensure that the anchor name of the chunk is predictable (e.g. based on
the chunk name). Then references from other modules (e.g. using
$MyModule.my_chunk syntax) could simply produce a link to the anchor.

Regardless, I too have long wanted to make Notes consumable from Haddock
documentation. It would be great to make progress on this.

Cheers,

- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20210914/f7b0c9c2/attachment.sig>


More information about the ghc-devs mailing list