use voile_util::loc::{Loc, ToLoc};
pub use self::{ast::*, ast_fold::*, ast_util::*, decl::*, decl_impl::*, pretty::*};
mod ast;
mod ast_fold;
mod ast_util;
mod decl;
mod decl_impl;
mod pretty;
pub mod subst;
impl Term {
pub fn at(self, loc: Loc) -> TermInfo {
TermInfo::new(self, loc)
}
}
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct TermInfo {
pub ast: Term,
pub loc: Loc,
}
impl TermInfo {
pub fn new(ast: Term, loc: Loc) -> Self {
Self { ast, loc }
}
pub fn map_ast(self, f: impl FnOnce(Term) -> Term) -> Self {
Self::new(f(self.ast), self.loc)
}
}
pub type Tele = Vec<Bind>;
pub type TeleS = [Bind];
pub type LetList = Vec<Let>;
pub type Ctx = Vec<Term>;