pub enum SynthType {
Base(String),
Arrow(Box<SynthType>, Box<SynthType>),
Product(Box<SynthType>, Box<SynthType>),
Sum(Box<SynthType>, Box<SynthType>),
Var(String),
Forall(String, Box<SynthType>),
Unit,
}Expand description
A simple type language for type-directed synthesis.
Variants§
Base(String)
Base type (e.g., “Nat”, “Bool”).
Arrow(Box<SynthType>, Box<SynthType>)
Function type A → B.
Product(Box<SynthType>, Box<SynthType>)
Product type A × B.
Sum(Box<SynthType>, Box<SynthType>)
Sum type A + B.
Var(String)
Type variable.
Forall(String, Box<SynthType>)
Universally quantified type ∀ α. T.
Unit
The unit type.
Implementations§
Trait Implementations§
impl Eq for SynthType
impl StructuralPartialEq for SynthType
Auto Trait Implementations§
impl Freeze for SynthType
impl RefUnwindSafe for SynthType
impl Send for SynthType
impl Sync for SynthType
impl Unpin for SynthType
impl UnsafeUnpin for SynthType
impl UnwindSafe for SynthType
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