Skip to main content

Env

Type Alias Env 

Source
pub type Env = Option<Rc<EnvNode>>;
Expand description

A shared, persistent environment: a nameless cons list of the bindings the running activation has made (innermost/most-recent first), on top of the closure’s captured Frame. A resolved reference (Expr::Local) reaches its value by walking its de Bruijn index next links and cloning the cell’s value — a pointer chase, no name compare and no per-link clone (contrast the old name-keyed cons list) — and an index that runs past the consed cells lands in the frame, an array index. The resolver (resolve.rs) assigns each reference the exact number of cells between it and its binder, in the same order the matcher conses them.

Aliased Type§

pub enum Env {
    None,
    Some(Rc<EnvNode>),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(Rc<EnvNode>)

Some value of type T.