Trait gluon_base::ast::Typed

source ·
pub trait Typed {
    type Ident;

    // Required method
    fn try_type_of(
        &self,
        env: &dyn TypeEnv<Type = ArcType>
    ) -> Result<ArcType<Self::Ident>, String>;

    // Provided method
    fn env_type_of(
        &self,
        env: &dyn TypeEnv<Type = ArcType>
    ) -> ArcType<Self::Ident> { ... }
}
Expand description

Trait which abstracts over things that have a type. It is not guaranteed that the correct type is returned until after typechecking

Required Associated Types§

Required Methods§

source

fn try_type_of( &self, env: &dyn TypeEnv<Type = ArcType> ) -> Result<ArcType<Self::Ident>, String>

Provided Methods§

source

fn env_type_of(&self, env: &dyn TypeEnv<Type = ArcType>) -> ArcType<Self::Ident>

Implementors§