use crate::sexp::{SExp, SExp::*}; pub enum Type { Integer, Arrow(Box, Box), } pub enum TypeError { UndefinedVariable(String), InvalidOperator { operator: SExp, expected: Type, found: Type, }, InvalidArgList { arglist: SExp, expected: Type, found: Type, }, OtherError } impl SExp { /// ```rust /// use melisp::{ /// r#type::{*, Type::*, TypeError::*}, /// sexp::{SExp::*, SLeaf::*, util::*}, /// }; /// ``` pub fn type_check(&self) -> Result { todo!() } }