-
Notifications
You must be signed in to change notification settings - Fork 1
/
runtime.js
35 lines (30 loc) · 656 Bytes
/
runtime.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function absurd(s) {
throw new Error(s);
}
// for now this is just an equaliy for constant types
// this would break down when objects or lists enter the picture
function equal(a, b) {
return a === b;
}
function hoist() {
console.log(b);
let b = 19;
return b;
}
x_4(x_16);
let x_16 = x_6(x_7, x_15);
let x_15 = x_9(x_13, x_14);
let x_14 = 0;
let x_13 = (comp_0, ks_0) => {
let x_10 = comp_0[0];
let x_11 = 0;
let x_12 = equal(x_10, x_11);
if (x_12) {
let l_0 = comp_0[1];
let idk1_0 = comp_0[2];
let idk2_0 = comp_0[3];
return absurd("Unhandled effect");
} else {
return absurd("Pattern match failure");
}
};