Enum gluon_base::ast::Pattern[][src]

pub enum Pattern<Id> {
    As(Id, Box<SpannedPattern<Id>>),
    Constructor(TypedIdent<Id>, Vec<SpannedPattern<Id>>),
    Ident(TypedIdent<Id>),
    Record {
        typ: ArcType<Id>,
        types: Vec<PatternField<Id, Id>>,
        fields: Vec<PatternField<Id, SpannedPattern<Id>>>,
        implicit_import: Option<Spanned<Id, BytePos>>,
    },
    Tuple {
        typ: ArcType<Id>,
        elems: Vec<SpannedPattern<Id>>,
    },
    Literal(Literal),
    Error,
}

Variants

An as-pattern, eg. option @ { monoid, functor }

Constructor pattern, eg. Cons x xs

Ident pattern, eg: x

Record pattern, eg. { x, y = foo }

Fields of Record

Tuple pattern, eg: (x, y)

Fields of Tuple

A literal pattern

An invalid pattern

Trait Implementations

impl<Id: Clone> Clone for Pattern<Id>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<Id: PartialEq> PartialEq for Pattern<Id>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<Id: Debug> Debug for Pattern<Id>
[src]

Formats the value using the given formatter. Read more

impl Typed for Pattern<Symbol>
[src]

Auto Trait Implementations

impl<Id> Send for Pattern<Id> where
    Id: Send + Sync

impl<Id> Sync for Pattern<Id> where
    Id: Send + Sync