-
Notifications
You must be signed in to change notification settings - Fork 464
/
Copy pathUncurriedAlways.js
178 lines (138 loc) · 2.68 KB
/
UncurriedAlways.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Generated by ReScript, PLEASE EDIT WITH CARE
'use strict';
function foo(x, y) {
return x + y | 0;
}
var z = 7;
function bar(x, y) {
return x + y | 0;
}
var b = 7;
var w = 7;
var a = 7;
console.log(a);
[1].map(function (x) {
return x + 1 | 0;
});
function ptl(extra) {
return 10 + extra | 0;
}
function foo2(x, y) {
return x + y | 0;
}
function bar2(__x) {
return __x + 3 | 0;
}
function foo3(x, y, z) {
return (x + y | 0) + z | 0;
}
function bar3(__x) {
return foo3(__x, 3, 4);
}
function q(param) {
return null;
}
function inl() {
}
function inl2(x, y) {
return x + y | 0;
}
function foo$1(x, y, z) {
return [
x,
y,
z
];
}
function ptl$1(none, extra) {
return [
none,
"y",
extra
];
}
var a1 = [
"x",
"y",
"z"
];
console.log("a1:", a1);
var AllLabels = {
foo: foo$1,
ptl: ptl$1,
a1: a1
};
function foo$2(x, y, z, dOpt) {
var d = dOpt !== undefined ? dOpt : "d=0";
return [
x,
y,
z,
d
];
}
function ptl$2(none, extra, extra$1) {
return foo$2(none, "y", extra, extra$1);
}
var b1 = ptl$2("x", "z", undefined);
console.log("b1:", b1);
var b2 = ptl$2("x", "z", "d<-100");
console.log("b2:", b2);
var OptAtEnd = {
foo: foo$2,
ptl: ptl$2,
b1: b1,
b2: b2
};
function foo$3(d1Opt, x, d2Opt, y, d3Opt, z, d4Opt, w, d5Opt) {
var d1 = d1Opt !== undefined ? d1Opt : "d1=0";
var d2 = d2Opt !== undefined ? d2Opt : "d2=0";
var d3 = d3Opt !== undefined ? d3Opt : "d3=0";
var d4 = d4Opt !== undefined ? d4Opt : "d4=0";
var d5 = d5Opt !== undefined ? d5Opt : "d5=0";
return [
d1,
x,
d2,
y,
d3,
z,
d4,
w,
d5
];
}
function ptl$3(none, none$1, none$2, none$3, none$4, none$5, extra) {
return foo$3(none, none$1, none$2, "y", none$3, none$4, none$5, "w", extra);
}
var c1 = ptl$3(undefined, "x", undefined, undefined, "z", undefined, undefined);
console.log("c1:", c1);
var c2 = ptl$3("d1<-100", "x", undefined, undefined, "z", undefined, undefined);
console.log("c2:", c2);
var c3 = ptl$3(undefined, "x", "d2<-200", undefined, "z", "d4<-400", undefined);
console.log("c3:", c3);
var OptMixed = {
foo: foo$3,
ptl: ptl$3,
c1: c1,
c2: c2,
c3: c3
};
exports.foo = foo;
exports.z = z;
exports.bar = bar;
exports.b = b;
exports.w = w;
exports.a = a;
exports.ptl = ptl;
exports.foo2 = foo2;
exports.bar2 = bar2;
exports.foo3 = foo3;
exports.bar3 = bar3;
exports.q = q;
exports.inl = inl;
exports.inl2 = inl2;
exports.AllLabels = AllLabels;
exports.OptAtEnd = OptAtEnd;
exports.OptMixed = OptMixed;
/* Not a pure module */