Skip to content

Commit 8dde117

Browse files
committed
snapshot
1 parent 524fa67 commit 8dde117

31 files changed

+298
-274
lines changed

jscomp/ext/literals.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ let ns_sep_char = '-'
145145
let ns_sep = "-"
146146
let exception_id = "RE_EXN_ID"
147147

148-
let polyvar_hash = "HASH"
148+
let polyvar_hash = "NAME"
149149
let polyvar_value = "VAL"
150150

151151
let cons = "::"

jscomp/main/builtin_cmj_datasets.ml

+22-22
Large diffs are not rendered by default.

jscomp/test/a_filename_test.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -45,58 +45,58 @@ eq("File \"a_filename_test.ml\", line 10, characters 5-12", [
4545
]);
4646

4747
eq("File \"a_filename_test.ml\", line 22, characters 5-12", Ext_filename_test.node_relative_path(true, {
48-
HASH: "File",
48+
NAME: "File",
4949
VAL: "./a/b.c"
5050
}, {
51-
HASH: "File",
51+
NAME: "File",
5252
VAL: "./a/u/g.c"
5353
}), "./u/g.c");
5454

5555
eq("File \"a_filename_test.ml\", line 27, characters 5-12", Ext_filename_test.node_relative_path(true, {
56-
HASH: "File",
56+
NAME: "File",
5757
VAL: "./a/b.c"
5858
}, {
59-
HASH: "File",
59+
NAME: "File",
6060
VAL: "xxxghsoghos/ghsoghso/node_modules/buckle-stdlib/list.js"
6161
}), "buckle-stdlib/list.js");
6262

6363
eq("File \"a_filename_test.ml\", line 33, characters 5-12", Ext_filename_test.node_relative_path(true, {
64-
HASH: "File",
64+
NAME: "File",
6565
VAL: "./a/b.c"
6666
}, {
67-
HASH: "File",
67+
NAME: "File",
6868
VAL: "xxxghsoghos/ghsoghso/node_modules//buckle-stdlib/list.js"
6969
}), "buckle-stdlib/list.js");
7070

7171
eq("File \"a_filename_test.ml\", line 39, characters 5-12", Ext_filename_test.node_relative_path(true, {
72-
HASH: "File",
72+
NAME: "File",
7373
VAL: "./a/b.c"
7474
}, {
75-
HASH: "File",
75+
NAME: "File",
7676
VAL: "xxxghsoghos/ghsoghso/node_modules/./buckle-stdlib/list.js"
7777
}), "buckle-stdlib/list.js");
7878

7979
eq("File \"a_filename_test.ml\", line 45, characters 5-12", Ext_filename_test.node_relative_path(true, {
80-
HASH: "File",
80+
NAME: "File",
8181
VAL: "./a/c.js"
8282
}, {
83-
HASH: "File",
83+
NAME: "File",
8484
VAL: "./a/b"
8585
}), "./b");
8686

8787
eq("File \"a_filename_test.ml\", line 50, characters 5-12", Ext_filename_test.node_relative_path(true, {
88-
HASH: "File",
88+
NAME: "File",
8989
VAL: "./a/c"
9090
}, {
91-
HASH: "File",
91+
NAME: "File",
9292
VAL: "./a/b.js"
9393
}), "./b.js");
9494

9595
eq("File \"a_filename_test.ml\", line 55, characters 5-12", Ext_filename_test.node_relative_path(true, {
96-
HASH: "Dir",
96+
NAME: "Dir",
9797
VAL: "./a/"
9898
}, {
99-
HASH: "File",
99+
NAME: "File",
100100
VAL: "./a/b.js"
101101
}), "./b.js");
102102

jscomp/test/bs_unwrap_test.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ console.log(1337);
1313
console.log("hello world");
1414

1515
var arg_string = {
16-
HASH: "String",
16+
NAME: "String",
1717
VAL: "hi runtime"
1818
};
1919

2020
console.log(arg_string.VAL);
2121

2222
var arg_pair = {
23-
HASH: "Pair",
23+
NAME: "Pair",
2424
VAL: [
2525
"hi",
2626
1
@@ -40,7 +40,7 @@ console.log(3, "hi");
4040
console.log(4, undefined);
4141

4242
var some_arg = {
43-
HASH: "Bool",
43+
NAME: "Bool",
4444
VAL: true
4545
};
4646

@@ -56,10 +56,10 @@ function dyn_log3(prim, prim$1, prim$2) {
5656
}
5757

5858
dyn_log3({
59-
HASH: "Int",
59+
NAME: "Int",
6060
VAL: 8
6161
}, {
62-
HASH: "Bool",
62+
NAME: "Bool",
6363
VAL: true
6464
}, undefined);
6565

jscomp/test/ext_array_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function rfind_and_split(arr, cmp, v) {
202202
return "No_split";
203203
} else {
204204
return {
205-
HASH: "Split",
205+
NAME: "Split",
206206
VAL: [
207207
$$Array.sub(arr, 0, i),
208208
$$Array.sub(arr, i + 1 | 0, (arr.length - i | 0) - 1 | 0)
@@ -233,7 +233,7 @@ function find_and_split(arr, cmp, v) {
233233
return "No_split";
234234
} else {
235235
return {
236-
HASH: "Split",
236+
NAME: "Split",
237237
VAL: [
238238
$$Array.sub(arr, 0, i),
239239
$$Array.sub(arr, i + 1 | 0, (arr.length - i | 0) - 1 | 0)

jscomp/test/ext_filename_test.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ function chop_extension_if_any(fname) {
115115
var os_path_separator_char = Filename.dir_sep.charCodeAt(0);
116116

117117
function relative_path(file_or_dir_1, file_or_dir_2) {
118-
var relevant_dir1 = file_or_dir_1.HASH === "File" ? Curry._1(Filename.dirname, file_or_dir_1.VAL) : file_or_dir_1.VAL;
119-
var relevant_dir2 = file_or_dir_2.HASH === "File" ? Curry._1(Filename.dirname, file_or_dir_2.VAL) : file_or_dir_2.VAL;
118+
var relevant_dir1 = file_or_dir_1.NAME === "File" ? Curry._1(Filename.dirname, file_or_dir_1.VAL) : file_or_dir_1.VAL;
119+
var relevant_dir2 = file_or_dir_2.NAME === "File" ? Curry._1(Filename.dirname, file_or_dir_2.VAL) : file_or_dir_2.VAL;
120120
var dir1 = Ext_string_test.split(undefined, relevant_dir1, os_path_separator_char);
121121
var dir2 = Ext_string_test.split(undefined, relevant_dir2, os_path_separator_char);
122122
var go = function (_dir1, _dir2) {
@@ -149,17 +149,17 @@ function node_relative_path(node_modules_shorten, file1, dep_file) {
149149
var v = Ext_string_test.find(undefined, Test_literals.node_modules, file2);
150150
var len = file2.length;
151151
if (!(node_modules_shorten && v >= 0)) {
152-
return relative_path(dep_file.HASH === "File" ? ({
153-
HASH: "File",
152+
return relative_path(dep_file.NAME === "File" ? ({
153+
NAME: "File",
154154
VAL: absolute_path(dep_file.VAL)
155155
}) : ({
156-
HASH: "Dir",
156+
NAME: "Dir",
157157
VAL: absolute_path(dep_file.VAL)
158-
}), file1.HASH === "File" ? ({
159-
HASH: "File",
158+
}), file1.NAME === "File" ? ({
159+
NAME: "File",
160160
VAL: absolute_path(file1.VAL)
161161
}) : ({
162-
HASH: "Dir",
162+
NAME: "Dir",
163163
VAL: absolute_path(file1.VAL)
164164
})) + (node_sep + Curry._1(Filename.basename, file2));
165165
}

jscomp/test/fun_pattern_match.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function f4(param) {
7272
}
7373

7474
var x = {
75-
HASH: "A",
75+
NAME: "A",
7676
VAL: r
7777
};
7878

jscomp/test/gpr_1891_test.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
var Curry = require("../../lib/js/curry.js");
44

55
function foo(x) {
6-
if (typeof x === "string" || !(x.HASH === "Foo" && x.VAL === 3)) {
6+
if (typeof x === "string" || !(x.NAME === "Foo" && x.VAL === 3)) {
77
console.log("2");
88
} else {
99
console.log("1");
@@ -12,31 +12,31 @@ function foo(x) {
1212
}
1313

1414
function foo2(x) {
15-
if (typeof x === "string" || !(x.HASH === "Foo" && x.VAL === 3)) {
15+
if (typeof x === "string" || !(x.NAME === "Foo" && x.VAL === 3)) {
1616
return "xxx";
1717
} else {
1818
return "xxxx";
1919
}
2020
}
2121

2222
function foo3(x) {
23-
if (typeof x === "string" || !(x.HASH === "Foo" && x.VAL === 3)) {
23+
if (typeof x === "string" || !(x.NAME === "Foo" && x.VAL === 3)) {
2424
return 2;
2525
} else {
2626
return 1;
2727
}
2828
}
2929

3030
function foo4(x, h) {
31-
if (typeof x === "string" || !(x.HASH === "Foo" && x.VAL === 3)) {
31+
if (typeof x === "string" || !(x.NAME === "Foo" && x.VAL === 3)) {
3232
return ;
3333
} else {
3434
return Curry._1(h, undefined);
3535
}
3636
}
3737

3838
function foo5(x) {
39-
if (typeof x === "string" || !(x.HASH === "Foo" && x.VAL === 3)) {
39+
if (typeof x === "string" || !(x.NAME === "Foo" && x.VAL === 3)) {
4040
console.log("x");
4141
} else {
4242
console.log("hi");

jscomp/test/gpr_2633_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var Curry = require("../../lib/js/curry.js");
44

55
function on1(foo, $$event) {
66
foo.on((function () {
7-
switch ($$event.HASH) {
7+
switch ($$event.NAME) {
88
case "bar" :
99
return "bar";
1010
case "foo" :
@@ -17,7 +17,7 @@ function on1(foo, $$event) {
1717

1818
function on2(foo, h, $$event) {
1919
foo.on((function () {
20-
switch (Curry._1(h, $$event).HASH) {
20+
switch (Curry._1(h, $$event).NAME) {
2121
case "bar" :
2222
return "bar";
2323
case "foo" :

jscomp/test/gpr_4280_test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function fn(authState, route) {
4747
return 1;
4848
}
4949
exit = 2;
50-
} else if (route.HASH === "Onboarding") {
50+
} else if (route.NAME === "Onboarding") {
5151
onboardingRoute = route.VAL;
5252
} else {
5353
exit = 2;
@@ -62,7 +62,7 @@ function fn(authState, route) {
6262

6363
} else {
6464
var exit$1 = 0;
65-
if (typeof route === "string" || route.HASH !== "Onboarding") {
65+
if (typeof route === "string" || route.NAME !== "Onboarding") {
6666
exit$1 = 2;
6767
} else {
6868
onboardingRoute = route.VAL;
@@ -88,12 +88,12 @@ function fn(authState, route) {
8888
eq("File \"gpr_4280_test.ml\", line 46, characters 6-13", fn("Unauthenticated", "Invite"), 1);
8989

9090
eq("File \"gpr_4280_test.ml\", line 47, characters 6-13", fn("Unauthenticated", {
91-
HASH: "Onboarding",
91+
NAME: "Onboarding",
9292
VAL: 0
9393
}), 0);
9494

9595
eq("File \"gpr_4280_test.ml\", line 48, characters 6-13", fn({
96-
HASH: "Unverified",
96+
NAME: "Unverified",
9797
VAL: 0
9898
}, "Invite"), 2);
9999

jscomp/test/more_poly_variant_test.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function map(f, param) {
77
}
88
var match = param.VAL;
99
return {
10-
HASH: "Cons",
10+
NAME: "Cons",
1111
VAL: [
1212
f(match[0]),
1313
map(f, match[1])
@@ -16,14 +16,14 @@ function map(f, param) {
1616
}
1717

1818
function split_cases(x) {
19-
if (typeof x === "string" || x.HASH !== "Snoc") {
19+
if (typeof x === "string" || x.NAME !== "Snoc") {
2020
return {
21-
HASH: "A",
21+
NAME: "A",
2222
VAL: x
2323
};
2424
} else {
2525
return {
26-
HASH: "B",
26+
NAME: "B",
2727
VAL: x
2828
};
2929
}
@@ -38,7 +38,7 @@ function f(param) {
3838
}
3939

4040
function g1(param) {
41-
if (param.HASH === "Tag2") {
41+
if (param.NAME === "Tag2") {
4242
return "Tag2";
4343
} else {
4444
return "Tag1";

jscomp/test/ocaml_proto_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ var yyact = [
11031103
var _1 = Parsing.peek_val(__caml_parser_env, 2);
11041104
var _3 = Parsing.peek_val(__caml_parser_env, 0);
11051105
return extension_range_range(_1, {
1106-
HASH: "Number",
1106+
NAME: "Number",
11071107
VAL: _3
11081108
});
11091109
}),

0 commit comments

Comments
 (0)