[−][src]Enum minitt::ast::Expression
Exp
in Mini-TT.
Expression language for Mini-TT.
Variants
Unit
0
One
1
Type
U
Void
Empty file
Var(String)
bla
Sum(Branch)
sum { Bla x }
Split(Branch)
split { Bla x => y }
Pi(Typed, Box<Self>)
\Pi a: b. c
Sigma(Typed, Box<Self>)
\Sigma a: b. c
Lambda(Pattern, Option<AnonymousValue>, Box<Self>)
\lambda a. c
, the optional value is the type of the argument.
This cannot be specified during parsing because it's used for generated intermediate values
during type-checking.
First(Box<Self>)
bla.1
Second(Box<Self>)
bla.2
Application(Box<Self>, Box<Self>)
f a
Pair(Box<Self>, Box<Self>)
a, b
Constructor(String, Box<Self>)
Cons a
Constant(Pattern, Box<Self>, Box<Self>)
const bla
, this is an extension: a declaration whose type-signature is inferred.
This is very similar to a Declaration
.
Declaration(Box<Declaration>, Box<Self>)
let bla
or rec bla
Methods
impl Expression
[src]
pub fn eval(self, context: Telescope) -> Value
[src]
eval
in Mini-TT.
Evaluate an Expression
to a Value
under a Telescope
,
panic if not well-typed.
Trait Implementations
impl PartialEq<Expression> for Expression
[src]
fn eq(&self, other: &Expression) -> bool
[src]
fn ne(&self, other: &Expression) -> bool
[src]
impl Clone for Expression
[src]
fn clone(&self) -> Expression
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Expression
[src]
impl Display for Expression
[src]
impl Debug for Expression
[src]
Auto Trait Implementations
impl !Send for Expression
impl !Sync for Expression
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,