Merge llvm_testing, and use TypeCheckerIr instead of Abs

This commit is contained in:
Martin Fredin 2023-02-16 02:17:07 +01:00
commit 7ef7090aa5
21 changed files with 499 additions and 101 deletions

View file

@ -1,3 +1,6 @@
f : Int -> Int;
f = \x:Int. x+1;
tripplemagic : Int -> Int -> Int -> Int;
tripplemagic x y z = ((\x:Int. x+x) x) + y + z;
main : Int;
main = tripplemagic ((\x:Int. x+x+3) ((\x:Int. x) 2)) 5 3

View file

@ -1,3 +0,0 @@
main : Int -> Int -> Int;
main x y = (x : Int) + y;

View file

@ -1,7 +0,0 @@
add : Int -> Int -> Int;
add x = \y:Int. x+y;
main : Int;
main = (\z:Int. z+z) ((add 4) 6);

View file

@ -1,3 +0,0 @@
main : Int;
main = (\x:Int. x+x+3) ((\x:Int. x) 2);

View file

@ -1,7 +0,0 @@
f : Int -> Int;
f x = let
g : Int -> Int;
g = (\y:Int. y+1);
in
g (g x);

View file

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

View file

@ -1,4 +0,0 @@
f : Int -> Int -> Int;
f = \x:Int.\y:Int. x+y;

View file

@ -1,8 +0,0 @@
add : Int -> Int -> Int;
add x y = x + y;
apply : (Int -> Int) -> Int -> Int;
apply f x = f x;
main : Int;
main = apply (add 4) 6;

View file

@ -1,7 +0,0 @@
f : Int -> Int;
f x = let
double : Int -> Int;
double = \y:Int. y+y
in
double (x + 4);

View file

@ -1,5 +0,0 @@
main : Int;
main = (\f:Int -> Int.\x:Int.\y:Int. f x + f y) (\x:Int. x+x) ((\x:Int. x+1) ((\x:Int. x+3) 2)) 4