# [plt-scheme] software tool request

We (PLT) are looking for someone who is interested in
contributing a refactoring tool for modular programming
Here is the basic idea:
>* Is anyone here interested in starting a refactoring tool for drscheme
*>* that works like this:
*>*
*>* If it sees:
*>*
*>* (module ...
*>*
*>* (define (f arg1 ...)
*>* (define (g x ...) exp)
*>* ...)
*>*
*>*
*>* and FV(exp) - {x ...} ^ {arg1 ... } = 0, it proposes to lift g to the
*>* module level. It is kind of an extension of Check Syntax.
*
>* Once we have that I'd like to play with
*>*
*>* (module ...
*>*
*>* (define (f arg1 ...)
*>* (define (g x ...) exp)
*>* ...)
*>*
*>* and FV(exp) - {x ... } <= arg1 ... then it proposes to perform the
*>* following:
*>*
*>* (module ...
*>*
*>* (define (f arg1 ...)
*>* (define g (make-g FV(exp) ...))
*>* ...)
*>*
*>* (define (make-g FV(exp) ...)
*>* (lambda (x) exp))
*>*
*>* I am hoping to find other compiler-ish transformations that help us
*>* write good, comprehensible modules.
*
Ryan suggests the following first step:
>* As an even smaller first step, Check Syntax could offer to show all
*>* local-binding arrows that cross through a selected term. That is, I
*>* select the definition of 'g' above, right-click, and choose "Tack
*>* arrows of free variables". DrScheme tacks the arrows for lexically-
*>* bound
*>* variables that are free w.r.t. the definition. If there are none, then
*>* the trivial lifting is just Cut-Copy-Reindent.
*
He'll be in the internal contact (and you couldn't get a better syntax
hacker to guide you then Ryan, well, with the exception of Matthew
himself).
-- Matthias