Add bidirectional type checker, lambda lifter.

This commit is contained in:
Martin Fredin 2023-02-18 14:49:33 +01:00
parent 2fa30faa87
commit ac3f222753
22 changed files with 2440 additions and 577 deletions

11
sample-programs/basic-0 Normal file
View file

@ -0,0 +1,11 @@
data forall a. List (a) where {
Nil : List (a)
Cons : a -> List (a) -> List (a)
};
length : forall c. List (c) -> Int;
length = \list. case list of {
Nil => 0;
Cons x xs => 1 + length xs;
Cons x (Cons y Nil) => 2;
};

View file

@ -3,3 +3,4 @@ add x = \y. x+y;
main : Int ;
main = (\z. z+z) ((add 4) 6) ;