You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+22-19Lines changed: 22 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,25 +42,6 @@ this project.
42
42
43
43
To explore the full range of documentation possibilities, see [Reference: The Anatomy of a Message] below.
44
44
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`:
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
-
64
45
### Task Lists
65
46
66
47
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/).
159
140
Pull requests that make it easier to understand or navigate are very
160
141
welcome. The main generator `site.hs` is formatted using
161
142
[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`:
0 commit comments