Function mz_transform::normalize_lets::let_motion::hoist_bindings

source ·
fn hoist_bindings(expr: &mut MirRelationExpr)
Expand description

Hoist all exposed bindings to the root of the expression.

A binding is “exposed” if the path from the root does not cross a LetRec binding. After the call, the expression should be a linear sequence of bindings, where each Let binding is of a let-free expression. There may be LetRec expressions in the sequence, and their bindings will have hoisted bindings to their root, but not out of the binding.