ReifyResume

Enum ReifyResume 

Source
pub enum ReifyResume {
    IfTrueDone {
        c: RcExp,
        env: Env,
        f: RcExp,
    },
    IfFalseDone {
        c: RcExp,
        t: RcExp,
    },
    RunStaged {
        b: RcExp,
    },
    RunNowInner {
        env: Env,
    },
    LiftRefDone {
        s1: RcExp,
    },
    TopLevel,
}
Expand description

Discriminator for what shape of staged Exp to assemble when a reify scope completes. Each reify scope in the recursive code corresponds to one of these — the resume action knows what surrounding Exp the reified body slots into.

Variants§

§

IfTrueDone

Exp::If(c, t, f) with c=Code: t was being reified; f still needs reifying. Push a fresh ReifyCExit { resume: IfFalseDone } scope when this fires.

Fields

§c: RcExp

The condition’s code, already forced.

§env: Env

Environment for reifying the false branch.

§f: RcExp

The unevaluated false branch.

§

IfFalseDone

Both branches reified; reflect the staged If(c, t, f).

Fields

§c: RcExp

The condition’s code, already forced.

§t: RcExp

The reified true branch.

§

RunStaged

Exp::Run(b, e) with b=Code: reify e, reflect Run(b, e’).

Fields

§b: RcExp

The first operand’s code, already forced.

§

RunNowInner

Exp::Run(b, e) run-now path: inner reifyc completed, now do outer reifyv.

Fields

§env: Env

Environment for the outer reifyv evaluation.

§

LiftRefDone

Exp::LiftRef(e1, e2) with e1=Code: reify e2, reflect LiftRef.

Fields

§s1: RcExp

The first operand’s code, already forced.

§

TopLevel

Resume from evalmsg-style top-level reifyv. The result is returned directly (no surrounding staged Exp).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.