Commit daa1906
committed
Automated Resyntax fixes
This is an automated change generated by Resyntax.
#### Pass 1
Applied 1 fix to [`typed-racket-lib/typed-racket/types/tc-error.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/tc-error.rkt)
* Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
Applied 10 fixes to [`typed-racket-lib/typed-racket/types/printer.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/printer.rkt)
* Line 135, `quasiquote-to-list`: This quasiquotation is equialent to a simple `list` call.
* Line 152, `single-clause-match-to-match-define`: This `match` expression can be simplified using `match-define`.
* Line 163, `single-clause-match-to-match-define`: This `match` expression can be simplified using `match-define`.
* Line 320, `define-values-values-to-define`: This use of `define-values` is unnecessary.
* Line 327, `for/fold-result-keyword`: Only one of the `for/fold` expression's result values is used. Use the `#:result` keyword to return just that result.
* Line 367, `single-clause-match-to-match-define`: This `match` expression can be simplified using `match-define`.
* Line 464, `apply-append-for-loop-to-for-loop`: Instead of using `(apply append ...)` to flatten a list of lists, consider using `for*/list` to flatten the list.
* Line 480, `single-clause-match-to-match-define`: This `match` expression can be simplified using `match-define`.
* Line 515, `quasiquote-to-list`: This quasiquotation is equialent to a simple `list` call.
* Line 519, `quasiquote-to-list`: This quasiquotation is equialent to a simple `list` call.
Applied 2 fixes to [`typed-racket-lib/typed-racket/types/tc-result.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/tc-result.rkt)
* Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
* Line 158, `single-clause-match-to-match-define`: This `match` expression can be simplified using `match-define`.
Applied 1 fix to [`typed-racket-lib/typed/private/no-check-helper.rkt`](../blob/HEAD/typed-racket-lib/typed/private/no-check-helper.rkt)
* Line 5, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
Applied 6 fixes to [`typed-racket-lib/typed-racket/types/base-abbrev.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/base-abbrev.rkt)
* Line 105, `define-syntax-syntax-rules-to-define-syntax-rule`: This `define-syntax` macro can be replaced with a simpler, equivalent `define-syntax-rule` macro.
* Line 109, `define-syntax-syntax-rules-to-define-syntax-rule`: This `define-syntax` macro can be replaced with a simpler, equivalent `define-syntax-rule` macro.
* Line 496, `define-syntax-syntax-rules-to-define-syntax-rule`: This `define-syntax` macro can be replaced with a simpler, equivalent `define-syntax-rule` macro.
* Line 502, `define-syntax-syntax-rules-to-define-syntax-rule`: This `define-syntax` macro can be replaced with a simpler, equivalent `define-syntax-rule` macro.
* Line 509, `define-syntax-syntax-rules-to-define-syntax-rule`: This `define-syntax` macro can be replaced with a simpler, equivalent `define-syntax-rule` macro.
* Line 516, `define-syntax-syntax-rules-to-define-syntax-rule`: This `define-syntax` macro can be replaced with a simpler, equivalent `define-syntax-rule` macro.
Applied 3 fixes to [`typed-racket-test/external/tr-random-testing.rkt`](../blob/HEAD/typed-racket-test/external/tr-random-testing.rkt)
* Line 5, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
* Line 10, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
* Line 337, `if-begin-to-cond`: Using `cond` instead of `if` here makes `begin` unnecessary
Applied 3 fixes to [`typed-racket-lib/typed-racket/types/signatures.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/signatures.rkt)
* Line 6, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
* Line 52, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting.
* Line 59, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Applied 1 fix to [`typed-racket-lib/typed-racket/types/struct-table.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/struct-table.rkt)
* Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
Applied 3 fixes to [`typed-racket-lib/typed-racket/types/utils.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/utils.rkt)
* Line 19, `define-lambda-to-define`: The `define` form supports a shorthand for defining functions.
* Line 60, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting.
* Line 79, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Applied 4 fixes to [`typed-racket-lib/typed-racket/types/prop-ops.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/prop-ops.rkt)
* Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
* Line 56, `single-clause-match-to-match-define`: This `match` expression can be simplified using `match-define`.
* Line 111, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting.
* Line 382, `sort-with-keyed-comparator-to-sort-by-key`: This `sort` expression can be replaced with a simpler, equivalent expression.
Applied 1 fix to [`typed-racket-lib/typed-racket/types/union.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/union.rkt)
* Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
Applied 2 fixes to [`typed-racket-lib/typed-racket/types/generalize.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/generalize.rkt)
* Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
* Line 48, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Applied 1 fix to [`typed-racket-test/external/historical-counterexamples.rkt`](../blob/HEAD/typed-racket-test/external/historical-counterexamples.rkt)
* Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
Applied 1 fix to [`typed-racket-lib/typed-racket/types/substitute.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/substitute.rkt)
* Line 78, `if-let-to-cond`: `cond` with internal definitions is preferred over `if` with `let`, to reduce nesting
Applied 1 fix to [`typed-racket-lib/typed-racket/types/overlap.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/overlap.rkt)
* Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
Applied 3 fixes to [`typed-racket-lib/typed-racket/types/subtype.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/subtype.rkt)
* Line 536, `apply-flattening`: The `apply` function accepts single arguments in addition to a trailing list argument.
* Line 661, `if-else-false-to-and`: This `if` expression can be refactored to an equivalent expression using `and`.
* Line 793, `single-clause-match-to-match-define`: This `match` expression can be simplified using `match-define`.
Applied 2 fixes to [`typed-racket-lib/typed/private/rewriter.rkt`](../blob/HEAD/typed-racket-lib/typed/private/rewriter.rkt)
* Line 2, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
* Line 10, `syntax-disarm-migration`: The `syntax-disarm` function is a legacy function that does nothing.
Applied 2 fixes to [`typed-racket-lib/typed-racket/types/match-expanders.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/match-expanders.rkt)
* Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
* Line 78, `define-simple-macro-to-define-syntax-parse-rule`: The `define-simple-macro` form has been renamed to `define-syntax-parse-rule`.
Applied 3 fixes to [`typed-racket-lib/typed-racket/types/resolve.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/types/resolve.rkt)
* Line 52, `if-else-false-to-and`: This `if` expression can be refactored to an equivalent expression using `and`.
* Line 65, `inverted-when`: This negated `when` expression can be replaced by an `unless` expression.
* Line 101, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting.
## Summary
Fixed 50 issues in 19 files.
* Fixed 14 occurrences of `tidy-require`
* Fixed 7 occurrences of `single-clause-match-to-match-define`
* Fixed 7 occurrences of `let-to-define`
* Fixed 6 occurrences of `define-syntax-syntax-rules-to-define-syntax-rule`
* Fixed 3 occurrences of `quasiquote-to-list`
* Fixed 2 occurrences of `if-else-false-to-and`
* Fixed 1 occurrence of `define-values-values-to-define`
* Fixed 1 occurrence of `for/fold-result-keyword`
* Fixed 1 occurrence of `apply-append-for-loop-to-for-loop`
* Fixed 1 occurrence of `if-let-to-cond`
* Fixed 1 occurrence of `apply-flattening`
* Fixed 1 occurrence of `syntax-disarm-migration`
* Fixed 1 occurrence of `define-simple-macro-to-define-syntax-parse-rule`
* Fixed 1 occurrence of `inverted-when`
* Fixed 1 occurrence of `if-begin-to-cond`
* Fixed 1 occurrence of `define-lambda-to-define`
* Fixed 1 occurrence of `sort-with-keyed-comparator-to-sort-by-key`1 parent 81cd9a8 commit daa1906
File tree
19 files changed
+270
-271
lines changed- typed-racket-lib
- typed-racket/types
- typed/private
- typed-racket-test/external
19 files changed
+270
-271
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 105 | + | |
| 106 | + | |
108 | 107 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 108 | + | |
| 109 | + | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
| |||
493 | 489 | | |
494 | 490 | | |
495 | 491 | | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
514 | 502 | | |
515 | 503 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 504 | + | |
| 505 | + | |
521 | 506 | | |
522 | 507 | | |
523 | 508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
7 | 5 | | |
8 | | - | |
9 | 6 | | |
10 | 7 | | |
11 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
| 153 | + | |
153 | 154 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
162 | 161 | | |
163 | 162 | | |
164 | | - | |
165 | | - | |
| 163 | + | |
| 164 | + | |
166 | 165 | | |
167 | 166 | | |
168 | 167 | | |
| |||
317 | 316 | | |
318 | 317 | | |
319 | 318 | | |
320 | | - | |
321 | | - | |
322 | | - | |
| 319 | + | |
| 320 | + | |
323 | 321 | | |
324 | 322 | | |
325 | 323 | | |
326 | 324 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
351 | 349 | | |
352 | 350 | | |
353 | 351 | | |
| |||
365 | 363 | | |
366 | 364 | | |
367 | 365 | | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
373 | 370 | | |
374 | 371 | | |
375 | 372 | | |
| |||
461 | 458 | | |
462 | 459 | | |
463 | 460 | | |
464 | | - | |
465 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
466 | 464 | | |
467 | 465 | | |
468 | 466 | | |
| |||
478 | 476 | | |
479 | 477 | | |
480 | 478 | | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
| |||
512 | 509 | | |
513 | 510 | | |
514 | 511 | | |
515 | | - | |
| 512 | + | |
516 | 513 | | |
517 | 514 | | |
518 | 515 | | |
519 | | - | |
| 516 | + | |
520 | 517 | | |
521 | 518 | | |
522 | 519 | | |
| |||
0 commit comments