This page requires javascript to work

[][src]Enum voile::syntax::core::ast::Val

pub enum Val {
    Type(Level),
    Lam(Closure),
    Dt(PiSigPlicitBox<Self>, Closure),
    RowPoly(VarRecVariants),
    RowKind(LevelVarRecVec<String>),
    Cons(StringBox<Self>),
    Rec(Fields),
    Pair(Box<Self>, Box<Self>),
    Neut(Neutral),
}

Non-redex, canonical values.

Variants

Type(Level)

Type universe.

Lam(Closure)

Closure with parameter typed. For untyped closures, it can be represented as Neut directly.

Dt(PiSigPlicitBox<Self>, Closure)

Pi-like types (dependent types), with parameter explicitly typed.

RowPoly(VarRecVariants)

Row-polymorphic type literal.

RowKind(LevelVarRecVec<String>)

Row kind literals -- subtype of Type.

Cons(StringBox<Self>)

Constructor invocation.

Rec(Fields)

Record literal, without extension.

Pair(Box<Self>, Box<Self>)

Sigma instance.

Neut(Neutral)

Neutral value means irreducible but not canonical values.

Methods

impl Val[src]

Reduction functions.

pub fn apply(self, arg: Val) -> Self[src]

pub fn first(self) -> Self[src]

pub fn second(self) -> Val[src]

pub fn project(self, field: String) -> Val[src]

pub fn rec_extend(self, ext: Self) -> Self[src]

Extension for records.

pub fn split_extend(self, ext: Self) -> Self[src]

Extension for case-splits.

pub fn row_extend(self, ext: Self) -> Self[src]

Extension for row-polymorphic types.

pub(crate) fn attach_dbi(self, dbi: DBI) -> Self[src]

pub fn generated_to_var(self) -> Self[src]

pub fn unimplemented_to_glob(self) -> Self[src]

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

impl Val[src]

Constructors and traversal functions.

pub fn is_type(&self) -> bool[src]

pub fn is_universe(&self) -> bool[src]

pub fn pair(first: Self, second: Self) -> Self[src]

pub fn cons(name: String, param: Self) -> Self[src]

pub fn case_tree(tree: CaseSplit) -> Self[src]

pub fn lift(levels: LevelType, expr: Neutral) -> Self[src]

pub fn meta(index: MI) -> Self[src]

pub fn var(index: DBI) -> Self[src]

pub fn closure_lam(body: Self) -> Self[src]

pub fn glob(index: GI) -> Self[src]

pub fn split_on(split: CaseSplit, on: Neutral) -> Self[src]

pub fn or_split(split: CaseSplit, or: Neutral) -> Self[src]

pub fn fresh_axiom() -> Self[src]

pub(crate) fn postulate(uid: UID) -> Self[src]

pub fn fresh_implicit() -> Self[src]

pub fn fresh_unimplemented(index: GI) -> Self[src]

pub fn app(function: Neutral, args: Vec<Self>) -> Self[src]

pub fn fst(pair: Neutral) -> Self[src]

pub fn snd(pair: Neutral) -> Self[src]

pub fn proj(record: Neutral, field: String) -> Self[src]

pub fn closure_dependent_type(
    kind: PiSig,
    visib: Plicit,
    param_ty: TVal,
    body: TVal
) -> TVal
[src]

pub fn dependent_type(
    kind: PiSig,
    plicit: Plicit,
    param_type: TVal,
    closure: Closure
) -> TVal
[src]

pub fn variant_type(variants: Variants) -> TVal[src]

pub fn record_type(fields: Variants) -> TVal[src]

pub fn neutral_row_type(kind: VarRec, variants: Variants, ext: Neutral) -> TVal[src]

pub fn neutral_record(fields: Fields, ext: Neutral) -> Self[src]

pub fn neutral_variant_type(variants: Variants, ext: Neutral) -> TVal[src]

pub fn neutral_record_type(fields: Variants, ext: Neutral) -> TVal[src]

pub fn pi(param_plicit: Plicit, param_type: TVal, body: Closure) -> TVal[src]

pub fn sig(param_type: TVal, body: Closure) -> TVal[src]

pub fn into_neutral(self) -> Result<Neutral, Self>[src]

impl Val[src]

pub fn into_info(self, loc: Loc) -> ValInfo[src]

Trait Implementations

impl TraverseNeutral for Val[src]

impl RedEx<Val> for Val[src]

impl RedEx<Val> for Neutral[src]

impl Eq for Val[src]

impl Default for Val[src]

impl Clone for Val[src]

impl PartialEq<Val> for Val[src]

impl Debug for Val[src]

impl Display for Val[src]

impl LiftEx for Val[src]

Auto Trait Implementations

impl Send for Val

impl Unpin for Val

impl Sync for Val

impl UnwindSafe for Val

impl RefUnwindSafe for Val

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[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]