-
-
Notifications
You must be signed in to change notification settings - Fork 95
Automated Resyntax fixes #745
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
Conversation
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
The `displayln` function can be used to display a value with a newline after it.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `map` operation can be replaced with a `for/list` loop.
This `for-each` operation can be replaced with a `for` loop.
Using `cond` instead of `if` here makes `begin` unnecessary
This `hash-for-each` operation can be replaced with a `for` loop.
`cond` with internal definitions is preferred over `if` with `let`, to reduce nesting
flat-contract is a legacy form for constructing contracts from predicates; predicates can be used directly as contracts now.
(define is-module? | ||
(syntax-case sexp (module) | ||
[(module . rest | ||
) |
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 doesn't seem good.
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.
@sorawee is this your department?
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.
Yes :/. This particular instance should be easy to fix.
15))] | ||
["??"]))) | ||
frames)) | ||
(define trimmed-lengths (map add1 (map string-length trimmed-exprs))) |
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.
looks like trimmed-lengths
also isn't used.
If someone wants to fix the two things above and merge, that's okay with me. |
Resyntax fixed 20 issues in 5 files.
let-to-define
cond-let-to-cond-define
hash-for-each-to-for
if-let-to-cond
for-each-to-for
map-to-for
flat-contract-migration
display-and-newline-to-displayln
if-begin-to-cond