Skip to content

Commit 77e9f16

Browse files
committed
add let-in as experimental sintax sugar over case
1 parent 5cdb771 commit 77e9f16

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

regression/orig/test112.log

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
1
2+
2
3+
5
4+
6
5+
7
6+
8
7+
5
8+
6
9+
7
10+
8
11+
3

regression/test112.input

Whitespace-only changes.

regression/test112.lama

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
-- let A (x,y) be A(5,6) in write(x); write(y) ni;
2+
-- case A(5,6) of A(x,y) -> write(x); write(y) esac;
3+
-- let A (x,y) be A(5,6) in ....
4+
-- let A (x,y) be A(5,6) <----- void then ;
5+
6+
fun f (x) {
7+
write(x)
8+
}
9+
10+
f(let x = A(1,2) in x[0]);
11+
f(let x = A(1,2) in x[1]);
12+
13+
let A (x,y) = A(5,6) in let B(z,e) = B(7,8) in write(x); write(y); write(z); write(e);
14+
let A (x,y) = A(5,6) in (let B(z,e) = B(7,8) in write(x); write(y); write(z); write(e));
15+
16+
let x = (let x = C(1,2) in x[1]) + (let x = C(1,2) in x[0]) in write(x)

0 commit comments

Comments
 (0)