-
-
Notifications
You must be signed in to change notification settings - Fork 102
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 #1426
base: master
Are you sure you want to change the base?
Automated Resyntax fixes #1426
Conversation
This `match` expression can be simplified using `match-define`.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Using `cond` instead of `if` here makes `begin` unnecessary
This `if` expression can be refactored to an equivalent expression using `and`.
This `map` operation can be replaced with a `for/list` loop.
The `define` form supports a shorthand for defining functions.
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
This variable is returned immediately and can be inlined.
This `let` expression can be pulled up into a `define` expression.
`cond` with internal definitions is preferred over `if` with `let`, to reduce nesting
(list p*-base | ||
p*-name | ||
(if (places) | ||
(delay/thread (begin0 (run-in-other-place p* error?) |
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 in fmt
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.
Fixed in sorawee/fmt#84. @jackfirth, is it possible to re-run Resyntax?
(delay/thread (begin0 (run-in-other-place p* error?) | ||
(when (zero? (modulo i 10)) | ||
(eprintf ".")))) | ||
(delay (parameterize ([read-accept-reader #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.
Ditto.
(if (s-exn? res) | ||
(raise (deserialize-exn res)) | ||
res)] | ||
(when (s-exn? res) |
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 is amazing!
Fixing poor formatting in racket/typed-racket#1426
Fixing poor formatting in racket/typed-racket#1426
Resyntax fixed 50 issues in 14 files.
single-clause-match-to-match-define
let-to-define
always-throwing-if-to-when
inline-unnecessary-define
if-let-to-cond
if-else-false-to-and
define-let-to-double-define
if-begin-to-cond
map-to-for
define-lambda-to-define