Skip to content

Commit 8187cb3

Browse files
committed
Make error message examples easier to scan
1 parent 5c4e4cb commit 8187cb3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/pages/blog/the-perfect-bug-report.elm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,19 @@ In addition to the debugger, there are some improvements to the error messages a
133133
134134
## Improved Error Messages
135135
136-
Elm has an [error message catalog][catalog], full of messages that folks thought were confusing for some reason. This is great for constantly improving our error messages! Based on the feedback there, we have a couple nice improvements:
136+
Elm has an [error message catalog][catalog], full of messages that folks thought were confusing for some reason. This is great for constantly improving our error messages! Based on the feedback there, we have a couple nice improvements. Click the links to see examples!
137137
138-
- **Missing Arguments** — Check out the [before and after][137].
139-
- **Record Precision** — Check out the [before and after][131].
140-
- **Preserve Names** — You will see `Html msg` instead of `VirtualDom.Node a`.
141-
- **Type Annotations** — Adding type annotations can [improve errors][154].
142-
- **Bad Recursion** — Catches definitions that [cannot possibly work][873].
138+
- [Bad Recursion][e1] — clears up confusion about mutation
139+
- [Type Annotations][e2] — improves hints when you add type annotations
140+
- [Missing Arguments][e3] — points out when you forget arguments
141+
- [Record Precision][e4] — makes hints very specific for large records
142+
- Preserve Names — shows `Html msg` instead of `VirtualDom.Node a`
143143
144144
[catalog]: https://github.com/elm-lang/error-message-catalog/
145-
[131]: https://github.com/elm-lang/error-message-catalog/issues/131
146-
[137]: https://github.com/elm-lang/error-message-catalog/issues/137
147-
[154]: https://github.com/elm-lang/error-message-catalog/issues/154
148-
[873]: https://github.com/elm-lang/elm-compiler/issues/873
145+
[e1]: https://gist.github.com/evancz/4589b798ac2475d52b1d00cd04ace2c8#bad-recursion
146+
[e2]: https://gist.github.com/evancz/4589b798ac2475d52b1d00cd04ace2c8#type-annotations
147+
[e3]: https://gist.github.com/evancz/4589b798ac2475d52b1d00cd04ace2c8#missing-arguments
148+
[e4]: https://gist.github.com/evancz/4589b798ac2475d52b1d00cd04ace2c8#record-precision
149149
150150
These are definitely nice for experts, but I am most excited to see folks learning Elm with these additional hints! Recently, at the first ever [ElmBridge](https://twitter.com/elmlangbridge) event, I saw students running into problems that made me think “Oh, that is tricky, I’m gonna have to help.” But again and again, I was surprised to see that they just figured it out based on the error messages! My intuitions from my TA days and teaching older versions of Elm are not right anymore. Pretty exciting to see!
151151

0 commit comments

Comments
 (0)