[][src]Enum nar::syntax::core::Term

pub enum Term {
    Whnf(Val),
    Redex(GIIdentVec<Elim>),
}

Type for terms.

Variants

Whnf(Val)
Redex(GIIdentVec<Elim>)

Methods

impl Term[src]

Constructors and traversal functions.

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

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

pub fn cons(name: ConHead, params: Vec<Self>) -> Self[src]

pub fn data(info: ValData) -> Self[src]

pub fn meta(index: MI, params: Vec<Elim>) -> Self[src]

pub fn reflexivity() -> Self[src]

pub fn universe(level: Level) -> Self[src]

pub fn identity(ty: Self, a: Self, b: Self) -> Self[src]

pub fn fresh_axiom() -> Self[src]

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

pub fn def(gi: GI, ident: Ident, elims: Vec<Elim>) -> Self[src]

pub fn simple_def(gi: GI, ident: Ident) -> Self[src]

pub fn pi_from_tele(tele: Tele, ret: Self) -> Self[src]

pub fn tele_view(self) -> (Tele, Self)[src]

Returns

The telescope and the return type.

pub fn pi(licit: Plicit, name: UID, param_type: Term, body: Closure) -> Self[src]

pub fn pi2(param: Bind<Box<Term>>, body: Closure) -> Self[src]

impl Term[src]

pub fn apply(self, args: Vec<Term>) -> Self[src]

Use Term instead of Self to emphasize that it's not Elim.

pub fn apply_elim(self, args: Vec<Elim>) -> Self[src]

impl Term[src]

pub fn at(self, loc: Loc) -> TermInfo[src]

Trait Implementations

impl Clone for Term[src]

impl DeBruijn for Term[src]

impl Debug for Term[src]

impl Display for Term[src]

impl Eq for Term[src]

impl FoldVal for Term[src]

impl HasMeta for Term[src]

impl PartialEq<Term> for Term[src]

impl<A, B, X: RedEx<A>, Y: RedEx<B>> RedEx<(A, B), Term> for (X, Y)[src]

impl<R, T: RedEx<R>> RedEx<Bind<R>, Term> for Bind<T>[src]

impl RedEx<Closure, Term> for Closure[src]

impl<Ix, R, T: RedEx<R>> RedEx<Copat<Ix, R>, Term> for Copat<Ix, T>[src]

impl RedEx<Elim, Term> for Elim[src]

impl RedEx<Equation, Term> for Equation[src]

impl<R, T: RedEx<R>> RedEx<Let<R>, Term> for Let<T>[src]

impl<R, T: RedEx<R>> RedEx<MetaSol<R>, Term> for MetaSol<T>[src]

impl<R, T: RedEx<R>> RedEx<MetaSolution<R>, Term> for MetaSolution<T>[src]

impl<Ix, R, T: RedEx<R>> RedEx<Pat<Ix, R>, Term> for Pat<Ix, T>[src]

impl RedEx<Term, Term> for Term[src]

impl RedEx<Term, Term> for Val[src]

impl RedEx<ValData, Term> for ValData[src]

impl<R, T: RedEx<R>> RedEx<Vec<R>, Term> for Vec<T>[src]

For Tele.

impl StructuralEq for Term[src]

impl StructuralPartialEq for Term[src]

impl TryFrom<Copat<DBI, Term>> for Term[src]

type Error = String

The type returned in the event of a conversion error.

impl TryFrom<Pat<DBI, Term>> for Term[src]

type Error = String

The type returned in the event of a conversion error.

impl Unify for Term[src]

Auto Trait Implementations

impl RefUnwindSafe for Term

impl Send for Term

impl Sync for Term

impl Unpin for Term

impl UnwindSafe for Term

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.