/// Lookup the de-bruijn index and the type annotation of a binder in the
/// context using a user-defined name.
Lookup the de-bruijn index and the type annotation of a binder in the
context using a user-defined name.
Lookup the de - bruijn index and the type annotation of a binder in the context using a user - defined name .
pub fn lookup_binder(&self, name: &str) -> Option<(var::Index, &Rc<domain::Type>)> {
        let var_level = self.names_to_levels.get(name)?;
        let var_index = self.values().size().index(*var_level);
        let ty = self.tys.lookup_entry(var_index)?;
        log::trace!("lookup binder: {} -> {}", name, var_index);
        Some((var_index, ty))
    }
pub fn lookup_binder ( & self , name : & str ) -> Option < ( var :: Index , & Rc < domain :: Type > ) > { let var_level = self . names_to_levels . get ( name ) ? ; let var_index = self . values ( ) . size ( ) . index ( * var_level ) ; let ty = self . tys . lookup_entry ( var_index ) ? ; log :: trace ! ( " " name var_index ) ; Some ( ( var_index , ty ) ) }
Lookup the de-bruijn index and the type annotation of a binder in the
context using a user-defined name.
Lookup the de - bruijn index and the type annotation of a binder in the context using a user - defined name .
&self
name
&str