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

2021-09-15 Thread Zubin Duggal
On 21/09/14 16:54, Simon Peyton Jones via ghc-devs wrote: Yes, exactly. Notes have evolved into such a compellingly useful part of GHC that I really think they deserve Haddock support. But here’s another tension: the Haddock for a function should be about the user interface; its specification

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

2021-09-14 Thread Viktor Dukhovni
> On 14 Sep 2021, at 8:29 am, Hécate wrote: > > I may have missed an episode or two here but what prevents us from writing > Notes as Named Chunks¹, write them where Haddock expects you to put > documentation, and refer to them from the relevant spot in the code? > Viktor (in CC) has done a won

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

2021-09-14 Thread Ben Gamari
Sebastian Graf 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 lik

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

2021-09-14 Thread Simon Peyton Jones via ghc-devs
:simo...@microsoft.com> will cease to work. Use simon.peytonjo...@gmail.com<mailto:simon.peytonjo...@gmail.com> instead. (For now, it just forwards to simo...@microsoft.com.) From: ghc-devs On Behalf Of Sebastian Graf Sent: 14 September 2021 15:00 To: Hécate Cc: ghc-devs Subject: R

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

2021-09-14 Thread Hécate
Okay I see what you mean, thank you. :) Le 14/09/2021 à 16:37, Sebastian Graf a écrit : What I don't like: * I have to give a section name to an otherwise unused $chunk * I can't refer to $chunk from other modules * Everywhere I reference $chunk in a haddock, it gets inlined instead o

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

2021-09-14 Thread Sebastian Graf
What I don't like: - I have to give a section name to an otherwise unused $chunk - 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 d

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

2021-09-14 Thread Hécate
Hi, The named chunks can be positioned through the use of the export list syntax: module Foo   ( main   -- * Section name that will appear   --   -- $chunk   ) This should produce a free section that is not linked to any exported item. I see you're already using them though, so maybe I am und

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

2021-09-14 Thread Sebastian Graf
Hi, I've been using Haddock's named chunks feature too when writing the docs for selective lambda lifting. This is the result: https://hackage.haskell.org/package/ghc-8.10.2/docs/StgLiftLams.html, and this is how the source code looks: https://hackage.haskell.org/package/ghc-8.10.2/docs/src/StgLif

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

2021-09-14 Thread Hécate
> today’s Haddock doesn’t understand Notes.  But we could fix that if we were minded to. I may have missed an episode or two here but what prevents us from writing Notes as Named Chunks¹, write them where Haddock expects you to put documentation, and refer to them from the relevant spot in the