[−][src]Enum voile::syntax::surf::ast::Expr
Surface syntax tree node: Expression.
Variants
Var(Ident)
Variable reference
Cons(Ident)
Constructor call
Meta(Ident)
Explicit meta variable
Lift(SyntaxInfo, u32, Box<Self>)
Lift an expression many times
Type(SyntaxInfo, Level)
Type
literal, with levels
App(Box<Vec1<Self>>)
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)
.
Pipe(Box<Vec1<Self>>)
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)
.
Tup(Box<Vec1<Self>>)
Tuple constructor.
Comma operator, where a, b, c
is represented as Tup(a, vec![b, c])
instead of Tup(Tup(a, b), c)
.
RowPoly(SyntaxInfo, VarRec, Vec<LabExpr>, Option<Box<Self>>)
Row-polymorphic types, either record types or variant types.
RowKind(SyntaxInfo, VarRec, Vec<Ident>)
Row-polymorphic kinds, either record types or variant kinds.
Pi(Vec<Param>, Box<Self>)
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.
Sig(Vec<Param>, Box<Self>)
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.
Lam(SyntaxInfo, Vec<Ident>, Box<Self>)
Anonymous function, aka lambda expression.
Methods
impl Expr
[src]
pub fn pi(params: Vec<Param>, expr: Self) -> Self
[src]
pub fn lam(info: SyntaxInfo, params: Vec<Ident>, expr: Self) -> Self
[src]
pub fn app(applied: Self, arguments: Vec<Self>) -> Self
[src]
pub fn lift(info: SyntaxInfo, count: u32, target: Self) -> Self
[src]
pub fn pipe(first: Self, functions: Vec<Self>) -> Self
[src]
pub fn row_polymorphic_type(
info: SyntaxInfo,
labels: Vec<LabExpr>,
kind: VarRec,
rest: Option<Self>
) -> Self
[src]
info: SyntaxInfo,
labels: Vec<LabExpr>,
kind: VarRec,
rest: Option<Self>
) -> Self
pub fn sum(info: SyntaxInfo, labels: Vec<LabExpr>, rest: Option<Self>) -> Self
[src]
pub fn rec(info: SyntaxInfo, 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]
Trait Implementations
impl Clone for Expr
[src]
fn clone(&self) -> Expr
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Expr> for Expr
[src]
impl Eq for Expr
[src]
fn assert_receiver_is_total_eq(&self)
[src]
impl Debug for Expr
[src]
Auto Trait Implementations
impl Sync for Expr
impl Send for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
impl RefUnwindSafe for Expr
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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,