Trait gluon_base::types::TypeEnv
[−]
[src]
pub trait TypeEnv: KindEnv { fn find_type(&self, id: &SymbolRef) -> Option<&ArcType>; fn find_type_info(&self, id: &SymbolRef) -> Option<&Alias<Symbol, ArcType>>; fn find_record(
&self,
fields: &[Symbol],
selector: RecordSelector
) -> Option<(ArcType, ArcType)>; }
Trait for values which contains typed values which can be refered by name
Required Methods
fn find_type(&self, id: &SymbolRef) -> Option<&ArcType>
Returns the type of the value bound at id
fn find_type_info(&self, id: &SymbolRef) -> Option<&Alias<Symbol, ArcType>>
Returns information about the type id
fn find_record(
&self,
fields: &[Symbol],
selector: RecordSelector
) -> Option<(ArcType, ArcType)>
&self,
fields: &[Symbol],
selector: RecordSelector
) -> Option<(ArcType, ArcType)>
Returns a record which contains all fields
. The first element is the record type and the
second is the alias type.