dependent-types-implementation/src/main.rs

27 lines
507 B
Rust

#[derive(Debug)]
enum Term {
//Lambda
// Pi
Application(Box<Term>, Box<Term>),
Annotation(Box<Term>, Box<Term>),
FreeVar(u64),
Star,
BoxTerm
}
fn print(term: &Term, level: u64) -> String {
match term {
Term::Application(t1, t2) => "".into(),
Term::Annotation(t1, t2) => "".into(),
Term::FreeVar(x) => format!("{x}"),
Term::Star => format!("*"),
Term::BoxTerm => format!(""),
}
}
fn main() {
println!("Hello, world!");
}