improve abstraction for AssocList, fix bug in optional else (#315)

* improve abstraction for AssocList, fix bug in optional else

* add flag for tracing output, clean up code for output

* turned off tracing by default, updated goldens, removed two examples that use pointers, shouldn't have been there yet
This commit is contained in:
Jeremy G. Siek
2021-03-01 10:00:02 -05:00
committed by GitHub
parent 102ea3ccaf
commit bf6bb800c4
55 changed files with 293 additions and 7431 deletions
+1 -26
View File
@@ -1,26 +1 @@
********** source program **********
fn add1 Int: x -> Int {
return (x + 1);
}
fn main () -> Int {
var fn Int -> Int: f = add1;
return f(0 = (- 1));
}
********** type checking **********
--- step exp Int --->
--- step exp Int --->
--- step exp Int --->
--- step exp Int --->
--- step exp Int --->
--- step exp Int --->
--- step exp fn Int -> Int --->
--- step exp Int --->
--- handle value Int with fn Int -> Int<1>(Int,) --->
--- step exp Int --->
--- handle value Int with fn Int -> Int<2>(Int,Int,) --->
11: type error in call
expected: Int
actual: Tuple(0 = Int)
EXIT CODE: 255
result: 0