Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Expression Unnesting

In this series of steps, we un-nest nested expressions by storing intermediate values in anonymous variables.

At the end of this series of steps, every place context apart from simple let-bindings contains a side-effect-free place expression and every value context contains an operand, as defined in the Final Language section.

The rest of this section is a work-in-progress experiment about making the book executable.


pub fn desugar_nested_exprs(program: &mut Program) -> Result<(), CompilationError> {
    explicit_value_place::make_place_coercions_explicit(program)?;
    value_to_place::desugar_value_to_place(program)
}

Submodules

#[path = "explicit-value-place.md.rs"]
pub mod explicit_value_place;
#[path = "value-to-place.md.rs"]
pub mod value_to_place;