[−][src]Enum voile::syntax::core::ast::Val
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.
Pi-like types (dependent types), with parameter explicitly typed.
Row-polymorphic type literal.
Row kind literals -- subtype of Type
.
Constructor invocation.
Rec(Fields)
Record literal, without extension.
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]
kind: PiSig,
visib: Plicit,
param_ty: TVal,
body: TVal
) -> TVal
pub fn dependent_type(
kind: PiSig,
plicit: Plicit,
param_type: TVal,
closure: Closure
) -> TVal
[src]
kind: PiSig,
plicit: Plicit,
param_type: TVal,
closure: Closure
) -> TVal
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]
Trait Implementations
impl TraverseNeutral for Val
[src]
fn try_map_neutral<R>(
self,
f: &mut impl FnMut(Neutral) -> Result<Val, R>
) -> Result<Self, R>
[src]
self,
f: &mut impl FnMut(Neutral) -> Result<Val, R>
) -> Result<Self, R>
fn try_fold_neutral<E, R>(
self,
init: R,
f: impl Fn(R, Neutral) -> Result<R, E> + Copy
) -> Result<R, E>
[src]
self,
init: R,
f: impl Fn(R, Neutral) -> Result<R, E> + Copy
) -> Result<R, E>
fn fold_neutral<R>(self, init: R, f: impl Fn(R, Neutral) -> R + Copy) -> R
[src]
fn map_neutral(self, f: &mut impl FnMut(Neutral) -> Val) -> Self
[src]
impl RedEx<Val> for Val
[src]
fn reduce_with_dbi(self, arg: Val, dbi: DBI) -> Val
[src]
fn reduce_with_dbi_borrow(self, arg: &Val, dbi: DBI) -> Val
[src]
impl RedEx<Val> for Neutral
[src]
fn reduce_with_dbi(self, arg: Val, dbi: DBI) -> Val
[src]
fn reduce_with_dbi_borrow(self, arg: &Val, dbi: DBI) -> Val
[src]
impl Eq for Val
[src]
fn assert_receiver_is_total_eq(&self)
[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]
fn lift(self, levels: LevelType) -> Val
[src]
fn calc_level(&self) -> LevelCalcState
[src]
fn level(&self) -> Level
[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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,