Replace an instance of the left hand side of a definition by the corresponding right hand side. This is commonly known as unfolding or inlining, with the inverse termed folding.
showAll = table . map show
table = concat . format
|
showAll = (concat . format) . map show
table = concat . format
|
General comment:
The unfolded definition should be a function definition or a simple pattern binding. A complex function definition
need to be transformed into a simple one during the refactoring.
Left to right comment:
In the example, the call to the function | Right to left comment: |
Left to right conditions:
At the site of unfolding, the bindings for the free identifiers of the RHS of the unfolded definition (of Automatic renaming by the refactorer is required when the bound variables in the unfolded definition
capture the use of free variables at the site of unfolding, especially when the user has no
right to do renaming in the unfolded definition. | Right to left conditions: |