error-message-index
error-message-index copied to clipboard
Add missing GHC messages
- generate "Not documented" stub pages for known GHC error codes
This is done by using GHC.Types.Error.Codes.constructorCodes by @sheaf from https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10857 and making an index.md for each code using a script.
- closes #442
This is definitely not ideal, but at least it would help Google index the pages and suggest them instead of GHC tickets.
Maybe there are some plans for GHC 9.10 to improve this situation. If so, feel free to close this PR and update the parent Issue with that info. 🙂
Thanks a lot for taking up this issue :) It is important to get this done 👍
I am not yet convinced that adding the missing errors as markdown index.md files to the repository is the technically best solution. This approach will make it more difficult if we want to change the wording for any of the missing errors since we have to write a new script which modifies all these files.
It will also make it more difficult to add new missing errors that will be added in future releases of GHC, since the script that you used to generate these messages is not part of the repo.
But hakyll which we use as a static site generator is super flexible when it comes to generating pages from arbitrary functions written in Haskell. So I think we can just rebuild the logic of your script within our site.hs and add one single file MissingErrors.txt to the repository which contains the output of the ghc script. In that way we can easily extend the list of missing error messages, and we can also programmatically change how we want to present missing error messages.