pub enum ExprKey {
Lit(LcnfLit),
Var(LcnfVarId),
Ctor(String, u32, Vec<LcnfArg>),
Proj(String, u32, LcnfVarId),
App(LcnfArg, Vec<LcnfArg>),
CommApp(String, Vec<LcnfArg>),
}Expand description
A canonical, hashable key derived from an LCNF let-bound value.
ExprKey normalizes commutative operations so that Add(a,b) and
Add(b,a) map to the same key, enabling CSE across re-ordered
argument lists.
Variants§
Lit(LcnfLit)
Literal value.
Var(LcnfVarId)
Copy / identity: let x = y.
Ctor(String, u32, Vec<LcnfArg>)
Constructor: Ctor(name, tag, args).
Proj(String, u32, LcnfVarId)
Projection: proj_name.idx(var).
App(LcnfArg, Vec<LcnfArg>)
Function application: f(args) — only for pure calls.
CommApp(String, Vec<LcnfArg>)
Normalized commutative application (sorted args).
Trait Implementations§
impl Eq for ExprKey
impl StructuralPartialEq for ExprKey
Auto Trait Implementations§
impl Freeze for ExprKey
impl RefUnwindSafe for ExprKey
impl Send for ExprKey
impl Sync for ExprKey
impl Unpin for ExprKey
impl UnsafeUnpin for ExprKey
impl UnwindSafe for ExprKey
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