[−][src]Enum voile::syntax::surf::Expr
Surface syntax tree node: Expression.
Variants
Var(Ident)
Variable reference.
Cons(Ident)
Constructor call.
Meta(Ident)
Explicit meta variable.
Lift an expression many times.
Record projections.
Type
literal, with levels.
Function application.
Application operator, where f a b c
is represented as App(f, vec![a, b, c])
instead of App(App(App(f, a), b), c)
.
Function composition.
Pipeline operator, where a |> b |> f
is represented as Pipe(vec![a, b, f])
instead of Pipe(Pipe(Pipe(f, a), b), c)
.
Tuple constructor.
Comma operator, where a, b, c
is represented as Tup(a, vec![b, c])
instead of Tup(Tup(a, b), c)
.
Row-polymorphic types, either record types or variant types.
Record literals.
Row-polymorphic kinds, either record types or variant kinds.
Pi-type expression, where a -> b -> c
is represented as Pi(vec![a, b], c)
instead of Pi(a, Pi(b, c))
.
a
and b
here can introduce telescopes.
Sigma-type expression, where a * b * c
is represented as Sig(vec![a, b], c)
instead of Sig(a, Sig(b, c))
.
a
and b
here can introduce telescopes.
Case-chains. Label, binding, body, rest of the clauses
Whatever(Loc)
Termination of a case-chain.
Anonymous function, aka lambda expression.
Methods
impl Expr
[src]
pub fn pi(params: Vec<Param>, expr: Self) -> Self
[src]
pub fn lam(info: Loc, params: Vec<Ident>, expr: Self) -> Self
[src]
pub fn app(applied: Self, arguments: Vec<Self>) -> Self
[src]
pub fn lift(info: Loc, count: LevelType, target: Self) -> Self
[src]
pub fn pipe(first: Self, functions: Vec<Self>) -> Self
[src]
pub fn row_polymorphic_type(
info: Loc,
labels: Vec<LabExpr>,
kind: VarRec,
rest: Option<Self>
) -> Self
[src]
info: Loc,
labels: Vec<LabExpr>,
kind: VarRec,
rest: Option<Self>
) -> Self
pub fn record(info: Loc, fields: Vec<LabExpr>, rest: Option<Self>) -> Self
[src]
pub fn sum(info: Loc, labels: Vec<LabExpr>, rest: Option<Self>) -> Self
[src]
pub fn rec(info: Loc, labels: Vec<LabExpr>, rest: Option<Self>) -> Self
[src]
pub fn tup(first: Self, rest: Vec<Self>) -> Self
[src]
pub fn sig(params: Vec<Param>, expr: Self) -> Self
[src]
pub fn proj(expr: Self, projections: Vec1<Ident>) -> Self
[src]
pub fn cases(label: Ident, binding: Ident, body: Self, or: Self) -> Self
[src]
Trait Implementations
impl Clone for Expr
[src]
impl Eq for Expr
[src]
fn assert_receiver_is_total_eq(&self)
[src]
impl PartialEq<Expr> for Expr
[src]
impl Debug for Expr
[src]
impl StructuralPartialEq for Expr
[src]
impl StructuralEq for Expr
[src]
Auto Trait Implementations
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
impl RefUnwindSafe for Expr
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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> 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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,