/// Map an AST subtype indication to a term.
Map an AST subtype indication to a term.
Map an AST subtype indication to a term .
pub fn termify_subtype_ind(&self, subty: &ast::SubtypeInd) -> Result<Spanned<Term<'a>>> {
        let name = self.termify_compound_name(&subty.name)?;
        let res = match subty.res {
            Some(ast::ResolInd::Exprs(ref paren_elems)) => {
                Some(self.termify_paren_elems(paren_elems)?)
            }
            Some(ast::ResolInd::Name(ref name)) => Some(self.termify_compound_name(name)?),
            None => None,
        };
        if let Some(res) = res {
            let sp = Span::union(name.span, res.span);
            Ok(Spanned::new(
                Term::PrefixParen(Box::new(res), Box::new(name)),
                sp,
            ))
        } else {
            Ok(name)
        }
    }
pub fn termify_subtype_ind ( & self , subty : & ast :: SubtypeInd ) -> Result < Spanned < Term < ' a > > > { let name = self . termify_compound_name ( & subty . name ) ? ; let res = match subty . res { Some ( ast :: ResolInd :: Exprs ( ref paren_elems ) ) => { Some ( self . termify_paren_elems ( paren_elems ) ? ) } Some ( ast :: ResolInd :: Name ( ref name ) ) => Some ( self . termify_compound_name ( name ) ? ) , None => None , } ; if let Some ( res ) = res { let sp = Span :: union ( name . span , res . span ) ; Ok ( Spanned :: new ( Term :: PrefixParen ( Box :: new ( res ) , Box :: new ( name ) ) , sp , ) ) } else { Ok ( name ) } }
Map an AST subtype indication to a term.
Map an AST subtype indication to a term .
&self
subty
&ast::SubtypeInd