Skip to content

Automated Resyntax fixes#813

Merged
rfindler merged 11 commits into
masterfrom
autofix-153-1
Jul 19, 2026
Merged

Automated Resyntax fixes#813
rfindler merged 11 commits into
masterfrom
autofix-153-1

Conversation

@resyntax-ci

@resyntax-ci resyntax-ci Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Resyntax fixed 20 issues in 5 files.

  • Fixed 9 occurrences of let-to-define
  • Fixed 2 occurrences of nested-and-to-flat-and
  • Fixed 1 occurrence of if-let-to-cond
  • Fixed 1 occurrence of send-chain-to-send+
  • Fixed 1 occurrence of provide/contract-to-contract-out
  • Fixed 1 occurrence of extract-lets-from-function-arguments
  • Fixed 1 occurrence of cond-else-if-to-cond
  • Fixed 1 occurrence of list-element-definitions-to-match-define
  • Fixed 1 occurrence of make-temporary-file-to-make-temporary-directory
  • Fixed 1 occurrence of printf-to-display
  • Fixed 1 occurrence of cond-let-to-cond-define

resyntax-ci Bot added 11 commits July 5, 2026 00:33
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
The `else`-`if` branch of this `cond` expression can be collapsed into the `cond` expression.
Nested `and` expressions can be flattened into a single, equivalent `and` expression.
This use of `printf` has no arguments other than the template string.
`cond` with internal definitions is preferred over `if` with `let`, to reduce nesting
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Use internal definitions instead of `let` expressions inside function arguments to reduce nesting.
This method chain made of nested `send` expressions can be written more clearly as a `send+` expression.
These list element variable definitions can be expressed more succinctly with `match-define`. Note that the suggested replacement raises an error if the list contains more elements than expected.
The `provide/contract` form is a legacy form made obsolete by `contract-out`.
Use `make-temporary-directory` to make directories instead of `make-temporary-file`.
;; the definitions and click execute with the empty buffer
(test:new-window defs-canvas)
(test:menu-select "Edit" "Select All")
(test:menu-select "Edit" "Delete")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a giant blob where github's ability to highlight the changed portion of the diff is destroyed by the reindentation. I guess it is fine, tho, and since it is in test suites, I'll not stress over it. But it would be better if this wasn't happening.

(define name-original (list-ref val 0))
(define path-key (list-ref val 1))
(define require-depth (list-ref val 2))
(match-define (list name-original path-key require-depth) val)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

probably okay ....

@rfindler
rfindler merged commit 154ecb4 into master Jul 19, 2026
2 checks passed
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.

1 participant