[][src]Enum nar::syntax::pat::Copat

pub enum Copat<Ix, Term> {
    App(Pat<Ix, Term>),
    Proj(String),
}

Copatterns. The Ix is the representation of variable abstraction, like UID in abstract or DBI in core.

Variants

App(Pat<Ix, Term>)

Application copatterns.

Proj(String)

Projection copatterns.

Methods

impl<Ix, Term> Copat<Ix, Term>[src]

pub fn absurd() -> Self[src]

pub fn reflexivity() -> Self[src]

pub fn var(ix: Ix) -> Self[src]

pub fn term(term: Term) -> Self[src]

pub fn cons(is_forced: bool, cons: ConHead, pats: Vec<Pat<Ix, Term>>) -> Self[src]

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

pub fn map_app<Ix2, Term2>(
    self,
    f: impl FnOnce(Pat<Ix, Term>) -> Pat<Ix2, Term2>
) -> Copat<Ix2, Term2>
[src]

impl<Term> Copat<UID, Term>[src]

pub fn fresh_var() -> Self[src]

Trait Implementations

impl<Ix: Clone, Term: Clone> Clone for Copat<Ix, Term>[src]

impl<Ix: Debug, Term: Debug> Debug for Copat<Ix, Term>[src]

impl<Ix: Eq, Term: Eq> Eq for Copat<Ix, Term>[src]

impl From<Copat<DBI, Term>> for Elim[src]

impl<Ix: PartialEq, Term: PartialEq> PartialEq<Copat<Ix, Term>> for Copat<Ix, Term>[src]

impl<Ix, Term> PatCommon for Copat<Ix, Term>[src]

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

impl<Ix, Term> StructuralEq for Copat<Ix, Term>[src]

impl<Ix, Term> StructuralPartialEq for Copat<Ix, Term>[src]

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

type Error = String

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<Ix, Term> RefUnwindSafe for Copat<Ix, Term> where
    Ix: RefUnwindSafe,
    Term: RefUnwindSafe

impl<Ix, Term> Send for Copat<Ix, Term> where
    Ix: Send,
    Term: Send

impl<Ix, Term> Sync for Copat<Ix, Term> where
    Ix: Sync,
    Term: Sync

impl<Ix, Term> Unpin for Copat<Ix, Term> where
    Ix: Unpin,
    Term: Unpin

impl<Ix, Term> UnwindSafe for Copat<Ix, Term> where
    Ix: UnwindSafe,
    Term: UnwindSafe

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, 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.