Function blisp::typing

source ·
pub fn typing(exprs: TypingContext) -> Result<Context, LispErr>
Expand description

perform type checking and inference

Example

let code = "(export factorial (n) (Pure (-> (Int) Int))
   (if (<= n 0)
       1
       (* n (factorial (- n 1)))))";

let exprs = blisp::init(code, vec![]).unwrap();
blisp::typing(exprs).unwrap();