Commit 4094b10
authored
Automated Resyntax fixes (#1452)
* Fix 14 occurrences of `single-clause-match-to-match-define`
This `match` expression can be simplified using `match-define`.
* Fix 1 occurrence of `define-simple-macro-to-define-syntax-parse-rule`
The `define-simple-macro` form has been renamed to `define-syntax-parse-rule`.
* Fix 1 occurrence of `equal-null-list-to-null-predicate`
The `null?` predicate can be used to test for the empty list.
* Fix 4 occurrences of `cond-let-to-cond-define`
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
* Fix 5 occurrences of `define-lambda-to-define`
The `define` form supports a shorthand for defining functions.
* Fix 8 occurrences of `let-to-define`
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
* Fix 3 occurrences of `let-values-then-call-to-call-with-values`
This `let-values` expression can be replaced with a simpler, equivalent `call-with-values` expression.
* Fix 1 occurrence of `inverted-when`
This negated `when` expression can be replaced by an `unless` expression.
* Fix 2 occurrences of `syntax-disarm-migration`
The `syntax-disarm` function is a legacy function that does nothing.
* Fix 2 occurrences of `if-else-false-to-and`
This `if` expression can be refactored to an equivalent expression using `and`.
* Fix 2 occurrences of `map-to-for`
This `map` operation can be replaced with a `for/list` loop.
* Fix 1 occurrence of `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.
* Fix 1 occurrence of `append*-and-map-to-append-map`
The `append-map` function can be used to map each element into multiple elements in a single pass.
* Fix 2 occurrences of `cond-else-if-to-cond`
The `else`-`if` branch of this `cond` expression can be collapsed into the `cond` expression.
* Fix 1 occurrence of `always-throwing-if-to-when`
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
* Fix 1 occurrence of `quasiquote-to-list`
This quasiquotation is equialent to a simple `list` call.
* Fix 1 occurrence of `let-to-define`
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
---------
Co-authored-by: resyntax-ci[bot] <181813515+resyntax-ci[bot]@users.noreply.github.com>1 parent 824a5d1 commit 4094b10
File tree
20 files changed
+296
-351
lines changed- typed-racket-lib
- typed-racket
- infer
- logic
- static-contracts/combinators
- utils
- typed/private
- typed-racket-test/performance
20 files changed
+296
-351
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
89 | | - | |
90 | | - | |
| 87 | + | |
| 88 | + | |
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 68 | + | |
| 69 | + | |
71 | 70 | | |
72 | 71 | | |
73 | | - | |
74 | | - | |
75 | | - | |
| 72 | + | |
| 73 | + | |
76 | 74 | | |
77 | 75 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 76 | + | |
| 77 | + | |
81 | 78 | | |
82 | 79 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 80 | + | |
| 81 | + | |
86 | 82 | | |
87 | 83 | | |
88 | | - | |
89 | | - | |
90 | | - | |
| 84 | + | |
| 85 | + | |
91 | 86 | | |
92 | 87 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 88 | + | |
| 89 | + | |
96 | 90 | | |
97 | 91 | | |
98 | 92 | | |
| |||
766 | 760 | | |
767 | 761 | | |
768 | 762 | | |
769 | | - | |
770 | | - | |
771 | | - | |
| 763 | + | |
| 764 | + | |
772 | 765 | | |
773 | 766 | | |
774 | 767 | | |
| |||
917 | 910 | | |
918 | 911 | | |
919 | 912 | | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
930 | 919 | | |
931 | 920 | | |
932 | 921 | | |
| |||
936 | 925 | | |
937 | 926 | | |
938 | 927 | | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
947 | 936 | | |
948 | 937 | | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | | - | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
980 | 962 | | |
981 | 963 | | |
982 | 964 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
125 | 123 | | |
126 | 124 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
133 | 129 | | |
134 | 130 | | |
135 | 131 | | |
| |||
161 | 157 | | |
162 | 158 | | |
163 | 159 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
204 | 203 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
62 | 48 | | |
63 | 49 | | |
64 | 50 | | |
| |||
0 commit comments