typed-racket
typed-racket copied to clipboard
Automated Resyntax fixes
This is an automated change generated by Resyntax.
Pass 1
Applied 1 fix to typed-racket-lib/typed-racket/typecheck/possible-domains.rkt
- Line 58,
and-match-to-match: Thisandexpression can be turned into a clause of the innermatchexpression, reducing nesting.
Applied 2 fixes to typed-racket-lib/typed-racket/typecheck/integer-refinements.rkt
- Line 3,
tidy-require: Keep imports inrequiresorted and grouped by phase, with collections before files. - Line 74,
define-lambda-to-define: Thedefineform supports a shorthand for defining functions.
Applied 3 fixes to typed-racket-lib/typed-racket/typecheck/toplevel-trampoline.rkt
- Line 11,
tidy-require: Keep imports inrequiresorted and grouped by phase, with collections before files. - Line 34,
tidy-require: Keep imports inrequiresorted and grouped by phase, with collections before files. - Line 64,
if-begin-to-cond: Usingcondinstead ofifhere makesbeginunnecessary
Applied 1 fix to typed-racket-lib/typed-racket/private/type-annotation.rkt
- Line 92,
let-to-define: Internal definitions are recommended instead ofletexpressions, to reduce nesting.
Applied 2 fixes to typed-racket-lib/typed-racket/private/user-defined-type-constr.rkt
- Line 2,
tidy-require: Keep imports inrequiresorted and grouped by phase, with collections before files. - Line 32,
single-clause-match-to-match-define: Thismatchexpression can be simplified usingmatch-define.
Applied 1 fix to typed-racket-lib/typed-racket/typecheck/check-unit-unit.rkt
- Line 178,
define-lambda-to-define: Thedefineform supports a shorthand for defining functions.
Applied 15 fixes to typed-racket-lib/typed-racket/private/type-contract.rkt
- Line 242,
if-begin-to-cond: Usingcondinstead ofifhere makesbeginunnecessary - Line 389,
unused-definition: This definition is not used. - Line 557,
let-to-define: Internal definitions are recommended instead ofletexpressions, to reduce nesting. - Line 838,
always-throwing-cond-to-when: Usingwhenandunlessis simpler than a conditional with an always-throwing branch. - Line 1139,
unused-definition: This definition is not used. - Line 1167,
single-clause-match-to-match-define: Thismatchexpression can be simplified usingmatch-define. - Line 1270,
zero-comparison-lambda-to-positive?: This lambda function is equivalent to the built-inpositive?predicate. - Line 1290,
map-to-for: Thismapoperation can be replaced with afor/listloop. - Line 1295,
single-clause-match-to-match-define: Thismatchexpression can be simplified usingmatch-define. - Line 1324,
unused-definition: This definition is not used. - Line 1549,
define-lambda-to-define: Thedefineform supports a shorthand for defining functions. - Line 1550,
define-lambda-to-define: Thedefineform supports a shorthand for defining functions. - Line 1551,
define-lambda-to-define: Thedefineform supports a shorthand for defining functions. - Line 1552,
define-lambda-to-define: Thedefineform supports a shorthand for defining functions. - Line 1553,
define-lambda-to-define: Thedefineform supports a shorthand for defining functions.
Applied 8 fixes to typed-racket-lib/typed-racket/private/shallow-rewrite.rkt
- Line 225,
if-let-to-cond:condwith internal definitions is preferred overifwithlet, to reduce nesting - Line 275,
define-let-to-double-define: Thisletexpression can be pulled up into adefineexpression. - Line 287,
if-let-to-cond:condwith internal definitions is preferred overifwithlet, to reduce nesting - Line 418,
let-to-define: Internal definitions are recommended instead ofletexpressions, to reduce nesting. - Line 428,
let-to-define: Internal definitions are recommended instead ofletexpressions, to reduce nesting. - Line 452,
if-let-to-cond:condwith internal definitions is preferred overifwithlet, to reduce nesting - Line 632,
let-to-define: Internal definitions are recommended instead ofletexpressions, to reduce nesting. - Line 717,
unused-definition: This definition is not used.
Applied 2 fixes to typed-racket-lib/typed-racket/private/with-types.rkt
- Line 3,
tidy-require: Keep imports inrequiresorted and grouped by phase, with collections before files. - Line 53,
inverted-unless: This negatedunlessexpression can be replaced by awhenexpression.
Applied 2 fixes to typed-racket-lib/typed-racket/typecheck/check-below.rkt
- Line 3,
tidy-require: Keep imports inrequiresorted and grouped by phase, with collections before files. - Line 86,
unused-definition: This definition is not used.
Applied 3 fixes to typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt
- Line 96,
single-clause-match-to-match-define: Thismatchexpression can be simplified usingmatch-define. - Line 146,
let-to-define: Internal definitions are recommended instead ofletexpressions, to reduce nesting. - Line 197,
format-identity: This use offormatdoes nothing.
Applied 1 fix to typed-racket-lib/typed-racket/private/syntax-properties.rkt
- Line 2,
tidy-require: Keep imports inrequiresorted and grouped by phase, with collections before files.
Applied 1 fix to typed-racket-lib/typed-racket/private/parse-classes.rkt
- Line 3,
tidy-require: Keep imports inrequiresorted and grouped by phase, with collections before files.
Applied 3 fixes to typed-racket-lib/typed-racket/private/parse-type.rkt
- Line 186,
let-to-define: Internal definitions are recommended instead ofletexpressions, to reduce nesting. - Line 1509,
for/fold-with-conditional-body-to-unless-keyword: Thisfor/foldloop can be simplified by using the#:unlesskeyword. - Line 1658,
inline-unnecessary-define: This variable is returned immediately and can be inlined.
Summary
Fixed 45 issues in 14 files.
- Fixed 8 occurrences of
tidy-require - Fixed 7 occurrences of
let-to-define - Fixed 7 occurrences of
define-lambda-to-define - Fixed 5 occurrences of
unused-definition - Fixed 4 occurrences of
single-clause-match-to-match-define - Fixed 3 occurrences of
if-let-to-cond - Fixed 2 occurrences of
if-begin-to-cond - Fixed 1 occurrence of
and-match-to-match - Fixed 1 occurrence of
format-identity - Fixed 1 occurrence of
for/fold-with-conditional-body-to-unless-keyword - Fixed 1 occurrence of
inline-unnecessary-define - Fixed 1 occurrence of
always-throwing-cond-to-when - Fixed 1 occurrence of
zero-comparison-lambda-to-positive? - Fixed 1 occurrence of
map-to-for - Fixed 1 occurrence of
define-let-to-double-define - Fixed 1 occurrence of
inverted-unless