Trait gluon_base::types::TypeEnv [] [src]

pub trait TypeEnv: KindEnv {
    fn find_type(&self, id: &Symbol) -> Option<&TcType>;
    fn find_type_info(&self, id: &Symbol) -> Option<&Alias<SymbolTcType>>;
    fn find_record(&self, fields: &[Symbol]) -> Option<(&TcType, &TcType)>;
}

Trait for values which contains typed values which can be refered by name

Required Methods

fn find_type(&self, id: &Symbol) -> Option<&TcType>

Returns the type of the value bound at id

fn find_type_info(&self, id: &Symbol) -> Option<&Alias<SymbolTcType>>

Returns information about the type id

fn find_record(&self, fields: &[Symbol]) -> Option<(&TcType, &TcType)>

Returns a record which contains all fields. The first element is the record type and the second is the alias type.

Implementors