pub enum Order {
NOR,
CBN,
HSP,
HNO,
APP,
CBV,
HAP,
}Expand description
The evaluation order of β-reductions.
- the
NOR,HNO,APPandHAPorders reduce expressions to their normal form - the
APPorder will fail to fully reduce expressions containing terms without a normal form, e.g. theYcombinator (they will expand forever) - the
CBNorder reduces to weak head normal form - the
CBVorder reduces to weak normal form - the
HSPorder reduces to head normal form
Variants§
NOR
normal - leftmost outermost; the most popular reduction strategy
CBN
call-by-name - leftmost outermost, no reductions inside abstractions
HSP
head spine - leftmost outermost, abstractions reduced only in head position
HNO
hybrid normal - a mix between HSP (head spine) and NOR (normal) strategies
APP
applicative - leftmost innermost; the most eager strategy; unfit for recursion combinators
CBV
call-by-value - leftmost innermost, no reductions inside abstractions
HAP
hybrid applicative - a mix between CBV (call-by-value) and APP (applicative) strategies;
usually the fastest-reducing normalizing strategy
Trait Implementations§
impl Copy for Order
impl Eq for Order
impl StructuralPartialEq for Order
Auto Trait Implementations§
impl Freeze for Order
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin for Order
impl UnwindSafe for Order
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