pub enum Lean4Type {
Show 20 variants
Nat,
Int,
Float,
Bool,
String,
Unit,
Prop,
Type(u32),
List(Box<Lean4Type>),
Option(Box<Lean4Type>),
Prod(Box<Lean4Type>, Box<Lean4Type>),
Sum(Box<Lean4Type>, Box<Lean4Type>),
Fun(Box<Lean4Type>, Box<Lean4Type>),
Custom(String),
ForAll(String, Box<Lean4Type>, Box<Lean4Type>),
App(Box<Lean4Type>, Box<Lean4Type>),
IO(Box<Lean4Type>),
Array(Box<Lean4Type>),
Fin(Box<Lean4Type>),
Char,
}Expand description
Lean 4 type representation.
Variants§
Nat
Nat — natural numbers
Int
Int — integers
Float
Float — 64-bit floating point
Bool
Bool — boolean
String
String — string type
Unit
Unit — unit type
Prop
Prop — sort of propositions
Type(u32)
Type u — universe
List(Box<Lean4Type>)
List α
Option(Box<Lean4Type>)
Option α
Prod(Box<Lean4Type>, Box<Lean4Type>)
α × β (product)
Sum(Box<Lean4Type>, Box<Lean4Type>)
α ⊕ β (sum / Either)
Fun(Box<Lean4Type>, Box<Lean4Type>)
α → β (function type)
Custom(String)
Named type (user-defined or imported)
ForAll(String, Box<Lean4Type>, Box<Lean4Type>)
∀ (x : α), β x (dependent function / Pi type)
App(Box<Lean4Type>, Box<Lean4Type>)
Type application: f α
IO(Box<Lean4Type>)
IO α
Array(Box<Lean4Type>)
Array α
Fin(Box<Lean4Type>)
Fin n
Char
Char
Trait Implementations§
impl Eq for Lean4Type
impl StructuralPartialEq for Lean4Type
Auto Trait Implementations§
impl Freeze for Lean4Type
impl RefUnwindSafe for Lean4Type
impl Send for Lean4Type
impl Sync for Lean4Type
impl Unpin for Lean4Type
impl UnsafeUnpin for Lean4Type
impl UnwindSafe for Lean4Type
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