22
22
* along with this program; if not, write to the Free Software
23
23
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
24
24
25
- type obj = Caml_obj_extern.t
26
-
27
- let setupChromeDebugger : unit -> unit = fun %raw unit -> {|
25
+ type obj = Caml_obj_extern.t
26
+ open Js_internalRaw
27
+ let setupChromeDebugger : unit -> unit = [ %raw{|function(_){
28
28
29
29
// I don't know how to directly refer to the classes that chrome's built-in
30
30
// formatters use. adding " class" : " foo" doesn't seem to work
@@ -141,8 +141,8 @@ if (typeof window === "undefined"){
141
141
window.devtoolsFormatters = [formatter]
142
142
}
143
143
return 0
144
-
145
- |}
144
+ }
145
+ |}]
146
146
147
147
148
148
let setup = ref false
@@ -155,10 +155,12 @@ let setupOnce () =
155
155
156
156
type symbol
157
157
158
+ type 'a t = { value : 'a}
158
159
159
160
external cacheSymbol : string -> symbol = " for"
160
161
[@@bs.scope " Symbol" ] [@@bs.val ]
161
- external addProp : 'a -> symbol -> <value: 'b> Js.t -> 'a =
162
+
163
+ external addProp : 'a -> symbol -> 'b t -> 'a =
162
164
" defineProperty" [@@bs.scope " Object" ] [@@bs.val ]
163
165
164
166
let __ = Block.__
@@ -167,13 +169,13 @@ let __ = Block.__
167
169
let variant meta tag xs =
168
170
setupOnce ();
169
171
xs |. Caml_obj_extern.set_tag tag;
170
- xs |. addProp (cacheSymbol " BsVariant" ) [%obj {value = meta }]
172
+ xs |. addProp (cacheSymbol " BsVariant" ) {value = meta }
171
173
172
174
let simpleVariant meta xs =
173
175
setupOnce ();
174
- xs |. addProp (cacheSymbol " BsVariant" ) [%obj {value = meta }]
176
+ xs |. addProp (cacheSymbol " BsVariant" ) {value = meta }
175
177
176
178
177
179
let polyVar meta xs =
178
180
setupOnce ();
179
- xs |. addProp (cacheSymbol " BsPolyVar" ) [%obj {value = meta}]
181
+ xs |. addProp (cacheSymbol " BsPolyVar" ) {value = meta}
0 commit comments