resyntax
resyntax copied to clipboard
A Racket refactoring engine
``` resyntax: /Users/sorawee/projects/racket/extra-pkgs/scribble/scribble-lib/scribble/racket.rkt [define-case-lambda-to-define] This use of `case-lambda` is equivalent to using `define` with optional arguments. 367 (define out 368 (case-lambda 369 [(v cls) 370 (out v cls (let sz-loop...
``` (or (and b (weak-box-value b)) (let ([e (make-cached-element style content key)]) (hash-set! element-cache key (make-weak-box e)) e)) ``` could be much better communicated with: ``` (cond [b (weak-box-value b)]...
``` #lang racket/base (define (test b) (let ([x (cond [b (define x 1) (+ x 1)] [else 2])]) (+ x 1))) ``` should successfully convert let to define. It doesn't...
Why doesn't ``` #lang racket (define (test) (let ([x 1]) (+ x 1))) ``` get refactored, while ``` #lang racket/base (define (test) (let ([x 1]) (+ x 1))) ``` does?...
E.g. ``` (apply + (map length '((1) (2 3)))) ``` is equivalent to ``` (for/sum ([x (in-list '((1) (2 3)))]) (length x)) ``` More generally: ``` (apply + (map f...
Users of the analyze mode are already applying the changes manually, so it's fine to strip comments away. This is especially good if doing so allows Resyntax to discover more...
If I understand correctly, Resyntax uses only one function from `uri-old`: `uri-escape-i`. Would it be possible to implement this function directly, and cut the dependency? Three reasons: - `uri-old` is...
``` (begin (map f xs) (something-else)) ``` should be converted to: ``` (begin (for-each f xs) (something-else)) ``` (`begin` is just an example -- the middle of an internal definition...
Detect `(add-between char/string/symbol-datum list-expression)` and signal an error. It should be: `(add-between list-expression string-or-symbol-datum)`