Skip to content

Commit 268cc18

Browse files
committed
remove Console module
1 parent aacecee commit 268cc18

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

jscomp/main/jsoo_common.ml

-27
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module Js = struct
44
external inject : 'a -> any = "%identity"
55
external get : 'a -> 'b -> 'c = "caml_js_get"
66
external set : 'a -> 'b -> 'c -> unit = "caml_js_set"
7-
external meth_call : 'a -> string -> any array -> 'b = "caml_js_meth_call"
87
external pure_js_expr : string -> 'a = "caml_pure_js_expr"
98
let global = pure_js_expr "joo_global_object"
109
type obj
@@ -22,32 +21,6 @@ module Js = struct
2221
external to_bytestring : js_string t -> string = "caml_js_to_byte_string"
2322
end
2423

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-
5124
let mk_js_error (loc: Location.t) (msg: string) =
5225
let (file,line,startchar) = Location.get_pos_info loc.Location.loc_start in
5326
let (file,endline,endchar) = Location.get_pos_info loc.Location.loc_end in

jscomp/main/jsoo_common.mli

-12
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ module Js :
2929
external to_bytestring : js_string t -> string = "caml_js_to_byte_string"
3030
end
3131

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-
4432
(*
4533
Creates a Js Error object for given location with and a certain error message
4634
*)

0 commit comments

Comments
 (0)