Skip to content
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 #703

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Automated Resyntax fixes #703

wants to merge 10 commits into from

Conversation

resyntax-ci[bot]
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Dec 22, 2024

Resyntax fixed 20 issues in 1 file.

  • Fixed 9 occurrences of let-to-define
  • Fixed 2 occurrences of inverted-when
  • Fixed 2 occurrences of define-lambda-to-define
  • Fixed 2 occurrences of cond-let-to-cond-define
  • Fixed 2 occurrences of hash-ref-with-constant-lambda-to-hash-ref-without-lambda
  • Fixed 2 occurrences of if-else-false-to-and
  • Fixed 1 occurrence of tidy-require

resyntax-ci bot added 10 commits December 22, 2024 00:11
Keep imports in `require` sorted and grouped by phase, with collections before files.
This `if` expression can be refactored to an equivalent expression using `and`.
The `define` form supports a shorthand for defining functions.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
…ut-lambda`

The lambda can be removed from the failure result in this `hash-ref` expression.
This negated `when` expression can be replaced by an `unless` expression.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This negated `when` expression can be replaced by an `unless` expression.
default]))))
(define (filename->defs source [default #f])
(let/ec
k
Copy link
Member

Choose a reason for hiding this comment

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

@sorawee this is an unfortunate newline, I'd say. Better if let/ec always put the identifier on the same line and then to inside the let/ec isntead of to the start of the identifier. Is that possible?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree. Currently the let/ec call is treated like a function application. It would be easy to instruct that it's a special form, which needs to be formatted differently.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed by sorawee/fmt#83. @jackfirth is there a way to re-run this PR with the latest fmt?

@rfindler
Copy link
Member

This looks good to me.

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