pub enum LcnfExpr {
Let {
id: LcnfVarId,
name: String,
ty: LcnfType,
value: LcnfLetValue,
body: Box<LcnfExpr>,
},
Case {
scrutinee: LcnfVarId,
scrutinee_ty: LcnfType,
alts: Vec<LcnfAlt>,
default: Option<Box<LcnfExpr>>,
},
Return(LcnfArg),
Unreachable,
TailCall(LcnfArg, Vec<LcnfArg>),
}Expand description
Core LCNF expression in administrative normal form.
Variants§
Let
Let binding: let x : ty := val; body.
Fields
§
value: LcnfLetValueThe value being bound.
Case
Case split (pattern match).
Fields
Return(LcnfArg)
Return a value (terminal expression).
Unreachable
Unreachable code (after exhaustive match).
TailCall(LcnfArg, Vec<LcnfArg>)
Function application in tail position.
Trait Implementations§
impl StructuralPartialEq for LcnfExpr
Auto Trait Implementations§
impl Freeze for LcnfExpr
impl RefUnwindSafe for LcnfExpr
impl Send for LcnfExpr
impl Sync for LcnfExpr
impl Unpin for LcnfExpr
impl UnsafeUnpin for LcnfExpr
impl UnwindSafe for LcnfExpr
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