High-level refactorings should be doable by combining minimal code generation with retrie commands.
Rename
To rename foo to bar, proceed as follows:
-
Rename foo to bar in place
-
Generate a new declaration:
- Tell retrie to unfold
foo
Move
Similar to rename, but in step 1 we move bar to the target module, while in step 2 we generate foo in the source module.
Extract definition
- Ask the user for the desired name
- Generate a new declaration with the desired name, using the selected subexpression as the function body, and the unbound variables as formal parameters
- Tell retrie to fold the new name
High-level refactorings should be doable by combining minimal code generation with retrie commands.
Rename
To rename
footobar, proceed as follows:Rename
footobarin placeGenerate a new declaration:
fooMove
Similar to rename, but in step 1 we move
barto the target module, while in step 2 we generatefooin the source module.Extract definition