Adjust old type checker to new syntax, and refactor lambda lifter to use typed AST

This commit is contained in:
Martin Fredin 2023-02-15 23:55:16 +01:00
parent 514c809b1e
commit 210e55bb15
18 changed files with 554 additions and 145 deletions

View file

@ -1,9 +1,14 @@
id : Int -> Int;
id x = x;
add : Int -> Int -> Int;
add x y = x + y;
double : Int -> Int;
double n = n + n;
apply f x = \y. f x y;
apply : (Int -> Int -> Int) -> Int -> Int -> Int;
apply f x = \y:Int. f x y;
main = apply (id add) ((\x. x + 1) 1) (double 3);
main : Int;
main = apply add ((\x:Int. x + 1) 1) (double (id 3));