Add bidirectional type checker, lambda lifter.
This commit is contained in:
parent
2fa30faa87
commit
ac3f222753
22 changed files with 2440 additions and 577 deletions
11
sample-programs/basic-0
Normal file
11
sample-programs/basic-0
Normal 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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue