curry.toolchain.flat2icurry.rewrite module
Command line: apply the rewrite step of the routes to FlatCurry files in place.
python -m curry.toolchain.flat2icurry.rewrite [-q] [-s] M.fcy…
Each file is read, the two passes of the step run over it in order, the
binding optimization of bindingopt (a Boolean equality required to
be True becomes constrEq) and the set0 lift of setlift
(set0 e over the captured variables of e becomes setk L xs),
and the file is written again in the format of the front end when a pass
changed the program (curry.toolchain.flat2icurry.rewrite_file()); a
file in which nothing changes is left as it is, with its time. One line
per file reports the counts, or unchanged. This is what both routes
from Curry to ICurry do to a FlatCurry file after the front end wrote it;
the command serves a file written before the routes did so, or a file
outside the toolchain. The ICurry made from the file before is not
touched: sprite-make --rewrite-flat runs the step of a module again
and makes its products from the rewritten file.