-
-
Notifications
You must be signed in to change notification settings - Fork 103
Automated Resyntax fixes #1458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automated Resyntax fixes #1458
Conversation
`cond` with internal definitions is preferred over `if` with `let`, to reduce nesting
This `match` expression can be simplified using `match-define`.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This use of `format` does nothing.
Using `cond` instead of `if` here makes `begin` unnecessary
This use of `define-values` is unnecessary.
This negated `when` expression can be replaced by an `unless` expression.
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `if`-`else` chain can be converted to a `cond` expression.
This `case-lambda` form only has one case. Use a regular lambda instead.
The `define` form supports a shorthand for defining functions.
This `if` expression can be refactored to an equivalent expression using `and`.
This list-constructing expression can be simplified
This `let` expression can be pulled up into a `define` expression.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This seems to cause test failures, @jackfirth |
(match-define (tc-result1: t) (tc-expr/check e t)) | ||
t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samth I think this is the problem. Or something similar like this. Turns out match-define
's semantics are a bit different than I expected: the t
on the right hand side is bound to the t
in the (tc-result1: t)
pattern, not the t
argument to tc-expr/check/t
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fixed now.
Resyntax fixed 38 issues in 20 files.
let-to-define
define-lambda-to-define
single-clause-match-to-match-define
nested-if-to-cond
cond-let-to-cond-define
consing-onto-static-list
if-begin-to-cond
always-throwing-if-to-when
if-else-false-to-and
if-let-to-cond
case-lambda-with-single-case-to-lambda
define-values-values-to-define
define-let-to-double-define
inverted-when
format-identity