<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi devs,<div class=""><br class=""></div><div class="">Take a quick look at <a href="https://gitlab.haskell.org/ghc/ghc/-/blob/6db8a0f76ec45d47060e28bb303e9eef60bdb16b/compiler/GHC/Driver/Errors/Types.hs#L107" class="">https://gitlab.haskell.org/ghc/ghc/-/blob/6db8a0f76ec45d47060e28bb303e9eef60bdb16b/compiler/GHC/Driver/Errors/Types.hs#L107</a>  You will see a datatype there with constructors describing error messages that GHC might produce. These constructors have comments describing the error, sometimes giving an example, and sometimes listing test cases. More datatypes like this one and more constructors in these datatypes are on the way.</div><div class=""><br class=""></div><div class="">Question: Is there sufficient value in carefully documenting each constructor?</div><div class=""><br class=""></div><div class="">In my ideal world, each constructor would have a high-level description, a detailed description of each field, an example of a program that generates the error, and one or more test cases that test the output. Along the way, we might discover that no such test case exists, and then we would add. However, generating this documentation is hard. I was thinking of whipping up an army of volunteers (Hécate has advised me how to do this) to do the work, but that army will need to be fed (with instructions, supervision, and reviews) and will want to know that their work is important. Is this effort worthwhile? Do we see ourselves maintaining this documentation? Or is the effort better spent elsewhere, perhaps tagging each constructor with an ID and then making wiki pages? Not sure what's best -- would love ideas!</div><div class=""><br class=""></div><div class="">Credit to Alfredo di Napoli, who's done the heavy lifting of getting us this far.</div><div class=""><br class=""></div><div class="">Relevant tickets: </div><div class="">Original: <a href="https://gitlab.haskell.org/ghc/ghc/-/issues/18516" class="">https://gitlab.haskell.org/ghc/ghc/-/issues/18516</a></div><div class="">Tasks left: <a href="https://gitlab.haskell.org/ghc/ghc/-/issues/19905" class="">https://gitlab.haskell.org/ghc/ghc/-/issues/19905</a></div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Richard</div></body></html>