pub fn term_to_type_mark(&self, term: Spanned<Term>) -> Result<Spanned<TypeMarkRef>> {
        match term.value {
            Term::TypeMark(tm) => Ok(tm),
            _ => {
                self.emit(
                    DiagBuilder2::error(format!(
                        "`{}` is not a type or subtype",
                        term.span.extract()
                    ))
                    .span(term.span),
                );
                debugln!("It is a {:#?}", term);
                return Err(());
            }
        }
    }
/// Map a term to a type mark.
Map a term to a type mark.
Map a term to a type mark .
pub fn term_to_type_mark(&self, term: Spanned<Term>) -> Result<Spanned<TypeMarkRef>> {
        match term.value {
            Term::TypeMark(tm) => Ok(tm),
            _ => {
                self.emit(
                    DiagBuilder2::error(format!(
                        "`{}` is not a type or subtype",
                        term.span.extract()
                    ))
                    .span(term.span),
                );
                debugln!("It is a {:#?}", term);
                return Err(());
            }
        }
    }
pub fn term_to_type_mark ( & self , term : Spanned < Term > ) -> Result < Spanned < TypeMarkRef > > { match term . value { Term :: TypeMark ( tm ) => Ok ( tm ) , _ => { self . emit ( DiagBuilder2 :: error ( format ! ( " " term span extract ( ) ) ) . span ( term . span ) , ) ; debugln ! ( " " term ) ; return Err ( ( ) ) ; } } }
Map a term to a type mark.
Map a term to a type mark .
&self
term
Spanned<Term>
&self
term
Spanned<Term>