Skip to content

Commit f757e80

Browse files
committed
Move and rename another reference section
TBH I'm not sure this is a "reference" because I don't fully understand it.
1 parent 2e8e4e9 commit f757e80

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

CONTRIBUTING.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,6 @@ this project.
4242

4343
To explore the full range of documentation possibilities, see [Reference: The Anatomy of a Message] below.
4444

45-
## How to Document a GHC Error Code
46-
47-
To document a new error code, the following workflow can be convenient.
48-
1. Choose a code that you'd like to document, say `GHC-123`
49-
2. One of the following modules in the `compiler` directory of the GHC source tree will have a method called `diagnosticCode` in the instance of `Diagnostic`:
50-
* `GHC.Tc.Errors.Ppr` (error constructors starting `Tc`)
51-
* `GHC.Driver.Errors.Ppr` (error constructors starting `Driver`)
52-
* `GHC.Parser.Errors.Ppr` (error constructors starting `Pc`)
53-
* `GHC.HsToCore.Errors.Ppr` (error constructors starting `Ds`)
54-
3. Once the code has been found, identify the error datatype constructor that produces it.
55-
4. The documentation for the constructor will be in one of the following modules. Read the Haddock for an explanation of the error's meaning:
56-
* `GHC.Tc.Errors.Types`
57-
* `GHC.Driver.Errors.Types`
58-
* `GHC.Parser.Errors.Types`
59-
* `GHC.HsToCore.Errors.Types`
60-
5. Find the pretty-printer for the error constructor in the `X.Ppr` module. This will give an idea of how the message looks when rendered.
61-
6. Grep the `testsuite` directory for the error text to find examples that trigger the error.
62-
7. Follow the instructions below to create a page with an explanation and examples.
63-
6445
### Task Lists
6546

6647
We keep track of which GHC errors are being worked on, and which still require documentation,
@@ -159,3 +140,25 @@ The site is generated using [Hakyll](https://jaspervdj.be/hakyll/).
159140
Pull requests that make it easier to understand or navigate are very
160141
welcome. The main generator `site.hs` is formatted using
161142
[Ormolu](https://github.com/tweag/ormolu).
143+
144+
## Reference: How to Document a GHC Error Code
145+
146+
[FIXME I don't know how, or why, to follow these steps. Can someone who's submitted a
147+
message explain it?]
148+
149+
To document a new error code, the following workflow can be convenient.
150+
1. Choose a code that you'd like to document, say `GHC-123`
151+
2. [FIXME: This is not an actionable step] One of the following modules in the `compiler` directory of the GHC source tree will have a method called `diagnosticCode` in the instance of `Diagnostic`:
152+
* `GHC.Tc.Errors.Ppr` (error constructors starting `Tc`)
153+
* `GHC.Driver.Errors.Ppr` (error constructors starting `Driver`)
154+
* `GHC.Parser.Errors.Ppr` (error constructors starting `Pc`)
155+
* `GHC.HsToCore.Errors.Ppr` (error constructors starting `Ds`)
156+
3. Once the code has been found, identify the error datatype constructor that produces it.
157+
4. The documentation for the constructor will be in one of the following modules. Read the Haddock for an explanation of the error's meaning:
158+
* `GHC.Tc.Errors.Types`
159+
* `GHC.Driver.Errors.Types`
160+
* `GHC.Parser.Errors.Types`
161+
* `GHC.HsToCore.Errors.Types`
162+
5. Find the pretty-printer for the error constructor in the `X.Ppr` module. This will give an idea of how the message looks when rendered.
163+
6. Grep the `testsuite` directory for the error text to find examples that trigger the error.
164+
7. Follow the instructions below to create a page with an explanation and examples.

0 commit comments

Comments
 (0)