jackfirth / jackfirth/resyntax
Suggest using the `#:with` pattern directive instead of `with-syntax`
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 70
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
In uses of syntax-parse, clauses whose tail expression is a with-syntax form can be replaced with #:with pattern directives. For example, given this expression:
(syntax-parse stx
[foo:id
(with-syntax ([bar #'(+ 1 2 3)])
#'(foo bar)])
Resyntax ought to suggest simplifying it to this:
(syntax-parse stx
[foo:id
#:with bar #'(+ 1 2 3)
#'(foo bar)])
This can open up the door for related simplifications of syntax-parse such as #142.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating Resyntax's handling of syntax-parse clauses and any existing tests for related refactorings. Compare the with-syntax example with the requested #:with pattern directive, and review issue #142 for related simplifications. Done means the transformation is suggested correctly without changing the resulting syntax.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100