Skip to content

Automated Resyntax fixes #736

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

Closed
wants to merge 10 commits into from
Closed

Automated Resyntax fixes #736

wants to merge 10 commits into from

Conversation

resyntax-ci[bot]
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Apr 27, 2025

Resyntax fixed 20 issues in 6 files.

  • Fixed 6 occurrences of for-each-to-for
  • Fixed 3 occurrences of hash-for-each-to-for
  • Fixed 3 occurrences of let-to-define
  • Fixed 2 occurrences of if-let-to-cond
  • Fixed 1 occurrence of quasiquote-to-list
  • Fixed 1 occurrence of cond-let-to-cond-define
  • Fixed 1 occurrence of zero-comparison-to-positive?
  • Fixed 1 occurrence of flat-contract-migration
  • Fixed 1 occurrence of when-expression-in-for-loop-to-when-keyword
  • Fixed 1 occurrence of if-begin-to-cond

resyntax-ci bot added 10 commits April 27, 2025 00:16
Use the `#:when` keyword instead of `when` to reduce loop body indentation.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `for-each` operation can be replaced with a `for` loop.
This quasiquotation is equialent to a simple `list` call.
Using `cond` instead of `if` here makes `begin` unnecessary
This expression is equivalent to calling the `positive?` predicate.
This `hash-for-each` operation can be replaced with a `for` loop.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
`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.
(syntax-column s)
(syntax-position s)
(syntax-span s))
(make-sloc (loop (syntax-e s)) loc)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh. Bitten by jackfirth/resyntax#449 again.

@jackfirth jackfirth closed this Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants