Skip to content

Retrie: implement high-level refactorings including renaming #282

Closed
@pepeiborra

Description

@pepeiborra

High-level refactorings should be doable by combining minimal code generation with retrie commands.

Rename

To rename foo to bar, proceed as follows:

  1. Rename foo to bar in place

  2. Generate a new declaration:

foo = bar
  1. 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

  1. Ask the user for the desired name
  2. Generate a new declaration with the desired name, using the selected subexpression as the function body, and the unbound variables as formal parameters
  3. Tell retrie to fold the new name

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions