forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblock.js
46 lines (38 loc) · 984 Bytes
/
block.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
'use strict';
function __(tag, block) {
block.tag = tag;
return block;
}
function record(meta, xs) {
return Object.defineProperty(xs, Symbol.for("BsRecord"), {
value: meta
});
}
function variant(meta, tag, xs) {
xs.tag = tag;
return Object.defineProperty(xs, Symbol.for("BsVariant"), {
value: meta
});
}
function simpleVariant(meta, xs) {
return Object.defineProperty(xs, Symbol.for("BsVariant"), {
value: meta
});
}
function localModule(meta, xs) {
return Object.defineProperty(xs, Symbol.for("BsLocalModule"), {
value: meta
});
}
function polyVar(meta, xs) {
return Object.defineProperty(xs, Symbol.for("BsPolyVar"), {
value: meta
});
}
exports.__ = __;
exports.record = record;
exports.variant = variant;
exports.simpleVariant = simpleVariant;
exports.localModule = localModule;
exports.polyVar = polyVar;
/* No side effect */