Function mz_transform::normalize_lets::let_motion::digest_lets_helper
source · fn digest_lets_helper(
expr: &mut MirRelationExpr,
worklist: &mut Vec<(LocalId, MirRelationExpr, Option<LetRecLimit>)>,
bindings: &mut BTreeMap<LocalId, (MirRelationExpr, Option<LetRecLimit>)>,
)
Expand description
Extracts all Let
and LetRec
bindings from expr
through its first LetRec
.
The bindings themselves may not be Let
-free, and should be further processed to ensure this.
Bindings are extracted either into worklist
if they should be further processed (e.g. from a Let
),
or into bindings
if they should not be further processed (e.g. from a LetRec
).