Struct gluon_check::kindcheck::KindCheck
source · pub struct KindCheck<'a> { /* private fields */ }
Expand description
Struct containing methods for kindchecking types
Implementations§
source§impl<'a> KindCheck<'a>
impl<'a> KindCheck<'a>
pub fn new( info: &'a (dyn TypeEnv<Type = RcType> + 'a), idents: &'a mut (dyn IdentEnv<Ident = Symbol> + 'a), kind_cache: KindCache ) -> KindCheck<'a>
pub fn add_local(&mut self, name: Symbol, kind: ArcKind)
pub fn enter_scope_with( &mut self, variables: impl IntoIterator<Item = (Symbol, ArcKind)> )
pub fn exit_scope(&mut self)
pub fn type_kind(&self) -> ArcKind
pub fn function1_kind(&self) -> ArcKind
pub fn effect_field_kind(&self) -> ArcKind
pub fn function2_kind(&self) -> ArcKind
pub fn row_kind(&self) -> ArcKind
pub fn instantiate_kinds(&mut self, kind: &mut ArcKind)
pub fn kindcheck_type( &mut self, typ: &mut AstType<'_, Symbol> ) -> StdResult<ArcKind, Errors<SpannedError<Symbol, RcType<Symbol>>>>
pub fn kindcheck_expected( &mut self, typ: &mut AstType<'_, Symbol>, expected: &ArcKind ) -> StdResult<ArcKind, Errors<SpannedError<Symbol, RcType<Symbol>>>>
pub fn finalize_type(&mut self, typ: &mut AstType<'_, Symbol>)
pub fn finalize_generic(&self, var: &Generic<Symbol>) -> Generic<Symbol>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for KindCheck<'a>
impl<'a> !Send for KindCheck<'a>
impl<'a> !Sync for KindCheck<'a>
impl<'a> Unpin for KindCheck<'a>
impl<'a> !UnwindSafe for KindCheck<'a>
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