error-message-index
error-message-index copied to clipboard
Should we keep the GHC error message as a separate file?
In the examples for each error message we currently have the following directory structure:
- before/module.hs
- after/module.hs
- index.md
and the index.md
looks something like this:
---
title: Interesting description
---
Blablabla
Main.hs:4:1: error: [GHC-44432]
The type signature for ‘foo’ lacks an accompanying binding
|
4 | foo :: Int
| ^^^
Should we maybe think about moving the error message into a separate file? Maybe like the following:
- before/module.hs
- after/module.hs
- index.md
- error.stderr
And then use Hakyll to insert the error message into the description? The main motivation is that it will be much more difficult to do anything with scripts which could regenerate or check the error output in the future. Opinions: @david-christiansen ?
This sounds like a good idea, though tedious to implement.
On further thoughts, the messages should typically be associated with the examples, rather than with the main text. But having a file for them, perhaps with metadata matching it to a GHC version range, would sure be nice.