[][src]Trait gluon_base::ast::Typed

pub trait Typed {
    type Ident;
    fn try_type_of(
        &self,
        env: &dyn TypeEnv<Type = ArcType>
    ) -> Result<ArcType<Self::Ident>, String>; fn env_type_of(
        &self,
        env: &dyn TypeEnv<Type = ArcType>
    ) -> ArcType<Self::Ident> { ... } }

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

Associated Types

type Ident

Loading content...

Required methods

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

Loading content...

Provided methods

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

Loading content...

Implementors

impl Typed for Literal[src]

type Ident = Symbol

impl Typed for OwnedExpr<Symbol>[src]

type Ident = Symbol

impl Typed for RootExpr<Symbol>[src]

type Ident = Symbol

impl<'_> Typed for Expr<'_, Symbol>[src]

type Ident = Symbol

impl<'_> Typed for Pattern<'_, Symbol>[src]

type Ident = Symbol

impl<Id: Clone> Typed for TypedIdent<Id>[src]

type Ident = Id

impl<T: Typed> Typed for Spanned<T, BytePos>[src]

type Ident = T::Ident

Loading content...