File tree 6 files changed +20
-8
lines changed
6 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 86
86
87
87
(* */**)
88
88
89
- type +'a null
89
+ type +'a null =
90
+ | Value of 'a
91
+ | Null [@ as null ]
92
+ [@@ unboxed]
90
93
(* *
91
94
Nullable value of this type can be either null or 'a. This type is equivalent to Js.Null.t.
92
95
*)
@@ -97,7 +100,7 @@ type +'a undefined
97
100
*)
98
101
99
102
type +'a nullable =
100
- | Present of 'a
103
+ | Value of 'a
101
104
| Null [@ as null ]
102
105
| Undefined [@ as undefined ]
103
106
[@@ unboxed]
Original file line number Diff line number Diff line change 25
25
(* * Provides functionality for dealing with the `'a Js.null` type *)
26
26
27
27
28
- type + 'a t = 'a Js .null
28
+ type + 'a t = 'a Js .null =
29
+ | Value of 'a
30
+ | Null [@ as null ]
31
+ [@@ unboxed]
29
32
30
33
external to_opt : 'a t -> 'a option = " #null_to_opt"
31
34
external toOption : 'a t -> 'a option = " #null_to_opt"
Original file line number Diff line number Diff line change 26
26
27
27
(* * Provides functionality for dealing with the `Js.null('a)` type *)
28
28
29
- type +'a t = 'a Js .null
29
+ type +'a t = 'a Js .null =
30
+ | Value of 'a
31
+ | Null [@ as null ]
32
+ [@@ unboxed]
30
33
(* * Local alias for `Js.null('a)` *)
31
34
32
35
external return : 'a -> 'a t = " %identity"
Original file line number Diff line number Diff line change 25
25
(* * Contains functionality for dealing with values that can be both `null` and `undefined` *)
26
26
27
27
type + 'a t = 'a Js .nullable =
28
- | Present of 'a
28
+ | Value of 'a
29
29
| Null [@ as null ]
30
30
| Undefined [@ as undefined ]
31
31
[@@ unboxed]
Original file line number Diff line number Diff line change 25
25
(* * Contains functionality for dealing with values that can be both `null` and `undefined` *)
26
26
27
27
type +'a t = 'a Js .nullable =
28
- | Present of 'a
28
+ | Value of 'a
29
29
| Null [@ as null ]
30
30
| Undefined [@ as undefined ]
31
31
[@@ unboxed]
Original file line number Diff line number Diff line change 57
57
(* */**)
58
58
59
59
60
- type + 'a null
60
+ type + 'a null =
61
+ | Value of 'a
62
+ | Null [@ as null ]
63
+ [@@ unboxed]
61
64
(* * nullable, value of this type can be either [null] or ['a]
62
65
this type is the same as type [t] in {!Null}
63
66
*)
@@ -67,7 +70,7 @@ type + 'a undefined
67
70
this type is the same as type [t] in {!Undefined} *)
68
71
69
72
type + 'a nullable =
70
- | Present of 'a
73
+ | Value of 'a
71
74
| Null [@ as null ]
72
75
| Undefined [@ as undefined ]
73
76
[@@ unboxed]
You can’t perform that action at this time.
0 commit comments