[][src]Enum voile::syntax::core::Neutral

pub enum Neutral {
    Var(DBI),
    Ref(GI),
    Meta(MI),
    Lift(u32Box<Self>),
    Axi(Axiom),
    App(Box<Self>, Vec<Val>),
    Fst(Box<Self>),
    Snd(Box<Self>),
}

Irreducible because of the presence of generated value.

Variants

Var(DBI)

Local variable, referred by de-bruijn index.

Ref(GI)

Global variable, referred by index. Needed for recursive definitions.

Meta(MI)

Meta variable reference.

Lift(u32Box<Self>)

Lifting self to a higher/lower level.

Axi(Axiom)

Postulated value, aka axioms.

App(Box<Self>, Vec<Val>)

Function application, with all arguments collected (so we have easy access to application arguments).
This is convenient for meta resolution and termination check.

The "arguments" is supposed to be non-empty.

Fst(Box<Self>)

Projecting the first element of a pair.

Snd(Box<Self>)

Projecting the second element of a pair.

Methods

impl Neutral[src]

pub fn map_axiom(self, f: &mut impl FnMut(Axiom) -> Neutral) -> Self[src]

Trait Implementations

impl RedEx for Neutral[src]

impl LiftEx for Neutral[src]

fn level(&self) -> Level[src]

Calculate the level of self, like a normal value will have level 0, a type expression will have level 1 (or higher). Read more

impl PartialEq<Neutral> for Neutral[src]

impl Eq for Neutral[src]

impl Clone for Neutral[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Neutral[src]

impl Display for Neutral[src]

Auto Trait Implementations

impl Send for Neutral

impl Unpin for Neutral

impl Sync for Neutral

impl UnwindSafe for Neutral

impl RefUnwindSafe for Neutral

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]