Skip to content

Commit e02b843

Browse files
committed
change value to VAL for maintainability
1 parent 910baf6 commit e02b843

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

jscomp/ext/literals.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ let ns_sep = "-"
142142
let exception_id = "RE_EXN_ID"
143143

144144
let polyvar_hash = "HASH"
145-
let polyvar_value = "value"
145+
let polyvar_value = "VAL"
146146

147147
let cons = "::"
148148
let hd = "hd"

jscomp/runtime/caml_option.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ let option_get (x : 'a option) =
7575
else Obj.magic (valFromOption (Obj.repr x))
7676

7777

78-
type poly = {hash : int [@bs.as "HASH" (* Literals.polyvar_hash*)]; value : Obj.t }
78+
type poly = {
79+
hash : int [@bs.as "HASH" (* Literals.polyvar_hash*)];
80+
value : Obj.t [@bs.as "VAL"]
81+
}
7982

8083
(** [input] is optional polymorphic variant *)
8184
let option_unwrap (x : poly option) =

jscomp/runtime/caml_option.mli

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ val some : Obj.t -> Obj.t
3535

3636
val option_get : Obj.t option -> Obj.t Caml_undefined_extern.t
3737

38-
type poly = {hash : int [@bs.as "HASH"]; value : Obj.t }
38+
type poly = {
39+
hash : int [@bs.as "HASH"];
40+
value : Obj.t [@bs.as "VAL"]
41+
}
3942

4043
(** When it is None, return none
4144
When it is (Some (`a 3)) return 3

0 commit comments

Comments
 (0)