pub enum Expr {
Show 21 variants
Bool(Span, bool),
Uint(Span, u64),
Int(Span, i64),
Float(Span, f64),
String(Span, String),
Uuid(Span, Uuid),
DateTime(Span, DateTime<Utc>),
Hole(Span),
Tuple(Span, Vec<Arc<Expr>>),
List(Span, Vec<Arc<Expr>>),
Dict(Span, BTreeMap<Symbol, Arc<Expr>>),
RecordUpdate(Span, Arc<Expr>, BTreeMap<Symbol, Arc<Expr>>),
Var(Var),
App(Span, Arc<Expr>, Arc<Expr>),
Project(Span, Arc<Expr>, Symbol),
Lam(Span, Scope, Var, Option<TypeExpr>, Vec<TypeConstraint>, Arc<Expr>),
Let(Span, Var, Option<TypeExpr>, Arc<Expr>, Arc<Expr>),
LetRec(Span, Vec<(Var, Option<TypeExpr>, Arc<Expr>)>, Arc<Expr>),
Ite(Span, Arc<Expr>, Arc<Expr>, Arc<Expr>),
Match(Span, Arc<Expr>, Vec<(Pattern, Arc<Expr>)>),
Ann(Span, Arc<Expr>, TypeExpr),
}Variants§
Bool(Span, bool)
Uint(Span, u64)
Int(Span, i64)
Float(Span, f64)
String(Span, String)
Uuid(Span, Uuid)
DateTime(Span, DateTime<Utc>)
Hole(Span)
Tuple(Span, Vec<Arc<Expr>>)
List(Span, Vec<Arc<Expr>>)
Dict(Span, BTreeMap<Symbol, Arc<Expr>>)
RecordUpdate(Span, Arc<Expr>, BTreeMap<Symbol, Arc<Expr>>)
Var(Var)
App(Span, Arc<Expr>, Arc<Expr>)
Project(Span, Arc<Expr>, Symbol)
Lam(Span, Scope, Var, Option<TypeExpr>, Vec<TypeConstraint>, Arc<Expr>)
Let(Span, Var, Option<TypeExpr>, Arc<Expr>, Arc<Expr>)
LetRec(Span, Vec<(Var, Option<TypeExpr>, Arc<Expr>)>, Arc<Expr>)
Ite(Span, Arc<Expr>, Arc<Expr>, Arc<Expr>)
Match(Span, Arc<Expr>, Vec<(Pattern, Arc<Expr>)>)
Ann(Span, Arc<Expr>, TypeExpr)
Implementations§
Source§impl Expr
impl Expr
pub fn span(&self) -> &Span
pub fn span_mut(&mut self) -> &mut Span
pub fn with_span_begin_end(&self, begin: Position, end: Position) -> Expr
pub fn with_span_begin(&self, begin: Position) -> Expr
pub fn with_span_end(&self, end: Position) -> Expr
pub fn with_span(&self, span: Span) -> Expr
pub fn reset_spans(&self) -> Expr
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more