Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Put the program in A-normal form where only varrefs and literals are allowed in operand position.
Documentation
flattenL1 :: Prog1 -> PassM Prog1 Source #
Flatten ensures that function operands are "trivial".
In the process, it also lifts lets out of case scrutinees, if conditions, and tuple operands.
Note that it does not require tail expressions to be trivial. For example, it allows AppE and PrimAppE in the body of a let-expression.
Orphan instances
FlattenDeps e l d => Flattenable (PreExp e l d) Source # | |