Trait kailua_types::ty::Lattice
[−]
[src]
pub trait Lattice<Other = Self> { fn assert_sub(&self, other: &Other, ctx: &mut TypeContext) -> TypeResult<()>; fn assert_eq(&self, other: &Other, ctx: &mut TypeContext) -> TypeResult<()>; }
Any types with subtyping or equivalence relations.
Required Methods
fn assert_sub(&self, other: &Other, ctx: &mut TypeContext) -> TypeResult<()>
Asserts that self
is a consistent subtype of other
under the type context.
fn assert_eq(&self, other: &Other, ctx: &mut TypeContext) -> TypeResult<()>
Asserts that self
is a consistent type equal to other
under the type context.
Implementors
impl Lattice for Numbers
impl Lattice for Strings
impl Lattice for Tables
impl Lattice for Functions
impl Lattice for Unioned
impl<'a> Lattice<Unioned> for T<'a>
impl<'a, 'b> Lattice<T<'b>> for T<'a>
impl<'a> Lattice<Ty> for T<'a>
impl<'a> Lattice<T<'a>> for Ty
impl Lattice<Ty> for Ty
impl Lattice for Slot
impl<'a> Lattice<T<'a>> for Spanned<Slot>
impl<'a> Lattice<Ty> for Spanned<Slot>
impl Lattice for TySeq
impl Lattice for SpannedTySeq
impl Lattice for SlotSeq
impl Lattice for SpannedSlotSeq
impl<A: Lattice<B>, B> Lattice<Box<B>> for Box<A>
impl<A, B> Lattice<Spanned<B>> for Spanned<A> where
A: Lattice<B>,impl Lattice for TVar
impl Lattice for RVar