Commit 47c91ec
committed
Improve readability of numbers in traces and errors
Use stock derived show for newtypes RunNumber, TableId and CursorId,
rather than newtype derived. This means they get rendered as
"RunNumber 3" rather than 3. This makes traces easier to read. It also
means when things are shown in errors or ghci output, the result can be
pasted back in again as valid syntax.
Carefully checked that show was not being used for anything other than
derived show for other types, so we don't change the rendering of
anything important. Did this by temporarily removing the show instance
entirely and looking for build errors. Fixed two such cases in file path
rendering.1 parent 9607654 commit 47c91ec
2 files changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
| 19 | + | |
0 commit comments