This commit is contained in:
Alain Zscheile 2023-11-03 20:30:41 +01:00
parent f098db4e9c
commit b99ff62ea2
2 changed files with 25 additions and 2 deletions

View file

@ -1 +1,25 @@
pub mod egraph;
pub use egraph::Expr as Type;
#[derive(Clone, Debug, thiserror::Error]
pub enum Error {
}
#[derive(Clone, Debug)]
pub enum BinderState {
Unknown,
Resolved(Expr),
Used,
}
#[derive(Clone, Debug)]
pub struct TyContext {
pub binders: Vec<BinderState>,
}
pub type Result<T> = core::result::Result<T, Error>;
pub trait TypeCheckPattern {
fn type_check_pat(&self, ctx: &mut TyContext) -> Result<()>;
}

View file

@ -16,8 +16,7 @@ use yanais_syntax::none_up;
pub mod parser {
use yanais_syntax::lex as upslex;
pub use yanais_syntax::{
Error, ErrorCtx, ErrorKind, EvEqSourceSpan, FullError, MaybeParse, Parse,
Result,
Error, ErrorCtx, ErrorKind, EvEqSourceSpan, FullError, MaybeParse, Parse, Result,
};
pub mod lex {