forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlazy.js
47 lines (37 loc) · 1.09 KB
/
lazy.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
// GENERATED CODE BY BUCKLESCRIPT VERSION 0.3 , PLEASE EDIT WITH CARE
'use strict';
var Caml_obj = require("./caml_obj");
var Obj = require("./obj");
var CamlinternalLazy = require("./camlinternalLazy");
var Block = require("./block");
function from_fun(f) {
var x = Block.__(Obj.lazy_tag, [0]);
x[0] = f;
return x;
}
function from_val(v) {
var t = v.tag | 0;
if (t === Obj.forward_tag || t === Obj.lazy_tag || t === Obj.double_tag) {
return Caml_obj.caml_lazy_make_forward(v);
}
else {
return v;
}
}
function is_val(l) {
return +((l.tag | 0) !== Obj.lazy_tag);
}
var Undefined = CamlinternalLazy.Undefined;
var force_val = CamlinternalLazy.force_val;
var lazy_from_fun = from_fun;
var lazy_from_val = from_val;
var lazy_is_val = is_val;
exports.Undefined = Undefined;
exports.force_val = force_val;
exports.from_fun = from_fun;
exports.from_val = from_val;
exports.is_val = is_val;
exports.lazy_from_fun = lazy_from_fun;
exports.lazy_from_val = lazy_from_val;
exports.lazy_is_val = lazy_is_val;
/* No side effect */