File tree 2 files changed +0
-39
lines changed
2 files changed +0
-39
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ module Js = struct
4
4
external inject : 'a -> any = "%identity"
5
5
external get : 'a -> 'b -> 'c = "caml_js_get"
6
6
external set : 'a -> 'b -> 'c -> unit = "caml_js_set"
7
- external meth_call : 'a -> string -> any array -> 'b = "caml_js_meth_call"
8
7
external pure_js_expr : string -> 'a = "caml_pure_js_expr"
9
8
let global = pure_js_expr " joo_global_object"
10
9
type obj
@@ -22,32 +21,6 @@ module Js = struct
22
21
external to_bytestring : js_string t -> string = "caml_js_to_byte_string"
23
22
end
24
23
25
- module Console = struct
26
- type +'a meth
27
- class type t =
28
- object
29
- method log : _ -> unit meth
30
-
31
- method log_2 : _ -> _ -> unit meth
32
- end
33
-
34
- external get_console : unit -> t Js .t = " caml_js_get_console"
35
- let console = get_console ()
36
- let log anything = (
37
- fun (type res a2 a1 ) ->
38
- fun (a2 : a2 Js.t ) ->
39
- fun (a1 : a1 ) ->
40
- fun (_ : a2 -> a1 -> res meth ) ->
41
- (Js.Unsafe. meth_call a2 " log"
42
- [|(Js.Unsafe. inject a1)
43
- |] : res)
44
- )
45
- console
46
- anything
47
- (fun x -> x#log)
48
-
49
- end
50
-
51
24
let mk_js_error (loc : Location.t ) (msg : string ) =
52
25
let (file,line,startchar) = Location. get_pos_info loc.Location. loc_start in
53
26
let (file,endline,endchar) = Location. get_pos_info loc.Location. loc_end in
Original file line number Diff line number Diff line change @@ -29,18 +29,6 @@ module Js :
29
29
external to_bytestring : js_string t -> string = "caml_js_to_byte_string"
30
30
end
31
31
32
- module Console :
33
- sig
34
- type +'a meth
35
- class type t =
36
- object
37
- method log : _ -> unit meth
38
- method log_2 : _ -> _ -> unit meth
39
- end
40
- val console : t Js .t
41
- val log : 'a -> unit
42
- end
43
-
44
32
(*
45
33
Creates a Js Error object for given location with and a certain error message
46
34
*)
You can’t perform that action at this time.
0 commit comments