Skip to content

Commit 03ce953

Browse files
committed
cleanup deprecations
1 parent 7e5088b commit 03ce953

File tree

10 files changed

+1
-85
lines changed

10 files changed

+1
-85
lines changed

action.ml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ let ewma alpha : ewma =
2929
(fun f -> if compare nan !x = 0 then x := f else x := !x +. alpha *. (f -. !x)),
3030
(fun () -> if compare nan !x = 0 then 0. else !x)
3131

32-
let catmap = Stre.catmap
33-
let strl = Stre.list
34-
let stra = Stre.array
35-
3632
let uniq p e =
3733
let h = Hashtbl.create 16 in
3834
Enum.filter (fun x ->

action.mli

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,6 @@ val unpartition : 'a list array -> 'a list
8282
val stable_partition : int -> 'a list -> 'a list list
8383
val stable_unpartition : 'a list list -> 'a list
8484

85-
(** Printing *)
86-
87-
val catmap : ?sep:string -> ('a -> string) -> 'a list -> string [@@ocaml.deprecated "use Stre.catmap"]
88-
val strl : ('a -> string) -> 'a list -> string [@@ocaml.deprecated "use Stre.list"]
89-
val stra : ('a -> string) -> 'a array -> string [@@ocaml.deprecated "use Stre.array"]
90-
91-
9285
(** Array utilities *)
9386

9487
val array_random_exn : ?state:Random.State.t -> 'a array -> 'a

httpev.ml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,12 +660,10 @@ let setup_server config answer =
660660
let setup_fd fd config answer = let (_:server) = setup_server_fd fd config answer in ()
661661
let setup config answer = let (_:server) = setup_server config answer in ()
662662

663-
let run config answer =
663+
let server config answer =
664664
setup config answer;
665665
Ev.dispatch config.events
666666

667-
let server = run (* deprecated *)
668-
669667
let header n v = n,v
670668
let forbidden = `Forbidden, [], "forbidden"
671669
let not_found = `Not_found, [], "not found"

lwt_mark.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ let async ?log name run_thread =
182182
with_new_mark ?log ~name:(Lazy.from_val name) ~kind:Background @@
183183
run_thread
184184

185-
let ignore_result = async
186-
187185
let log_do msg =
188186
let mark = Option.default top_mark (Lwt.get key) in
189187
log_add_line mark msg

lwt_mark.mli

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ val status_s : string -> ?dump:('a -> string) -> (unit -> 'a Lwt.t) -> 'a
5454
purposes). Pass [~log] to log thread failure with devkit logger (level = warn). *)
5555
val async : ?log:Log.logger -> string -> (unit -> unit Lwt.t) -> unit
5656

57-
(** [ignore_result == async]. Deprecated.
58-
Note: this function takes argument [run_thread] that creates thread, not the thread itself, this differs from [Lwt.ignore_result].
59-
Reason: functions of this module may be used during evaluation of [(run_thread ()) : 'a Lwt.t], so we need to prepare Lwt thread
60-
storage before the evaluation of [(run_thread ())].
61-
*)
62-
val ignore_result : ?log:Log.logger -> string -> (unit -> unit Lwt.t) -> unit
63-
6457
(** Adds line to current thread's last logs.
6558
When marking is enabled, but current thread is not marked/named, line is added to special "<top>" thread logs. *)
6659
val log : string -> unit

prelude.ml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,6 @@ let eprintfn fmt = Printf.ksprintf prerr_endline fmt
2121
let curry f a b = f (a, b)
2222
let uncurry f (a,b) = f a b
2323

24-
module New(T : sig type t end)() =
25-
struct
26-
type t = T.t
27-
let inj = id
28-
let proj = id
29-
let inj_list = id
30-
let proj_list = id
31-
let inject = id
32-
let project = id
33-
let inject_list = id
34-
let project_list = id
35-
end
36-
3724
module Fresh(T : sig type t val compare : t -> t -> int end)() =
3825
struct
3926
type t = T.t

prelude.mli

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,6 @@ val printfn : ('a, unit, string, unit) format4 -> 'a
4343
val eprintfn : ('a, unit, string, unit) format4 -> 'a
4444

4545
(** abstract type generator *)
46-
module New(T : sig type t end)() :
47-
sig
48-
type t
49-
val inj : T.t -> t
50-
val proj : t -> T.t
51-
val inj_list : T.t list -> t list
52-
val proj_list : t list -> T.t list
53-
val inject : T.t -> t
54-
val project : t -> T.t
55-
val inject_list : T.t list -> t list
56-
val project_list : t list -> T.t list
57-
end[@@deprecated "use Fresh instead"]
58-
5946
module Fresh(T : sig type t val compare : t -> t -> int end)() :
6047
sig
6148
type t

signal.ml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,6 @@ let handle t sigs f =
4242
let _ = U.signalfd ~fd:t.fd ~sigs ~flags:[] () in
4343
()
4444

45-
let handle_exit t f = handle t [Sys.sigterm; Sys.sigint]
46-
(fun n ->
47-
log #info "Received signal %i (exit)..." n;
48-
(try f () with exn -> log #warn ~exn "Signal.handle_exit");
49-
log #info "Signal handler done.";)
50-
51-
let handle_reload t f = handle t [Sys.sighup]
52-
(fun n ->
53-
log #info "Received signal %i (reload)..." n;
54-
(try f () with exn -> log #warn ~exn "Signal.handle_reload");
55-
log #info "Signal handler done.")
56-
5745
(** {2 Lwt} *)
5846

5947
let h_lwt = Hashtbl.create 10
@@ -65,9 +53,6 @@ let lwt_handle sigs f =
6553
Hashtbl.replace h_lwt signo sig_id
6654
end
6755

68-
let lwt_handle_exit = lwt_handle [Sys.sigterm; Sys.sigint]
69-
let lwt_handle_reload = lwt_handle [Sys.sighup]
70-
7156
(** {2 generic registration} *)
7257

7358
let install_sys signo f = Sys.set_signal signo (Sys.Signal_handle f)

signal.mli

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@ type t
99
val init : Async.Ev.event_base -> t
1010
val stop : t -> unit
1111

12-
val handle : t -> int list -> (int -> unit) -> unit [@@deprecated "use Signal.set instead"]
13-
val handle_exit : t -> (unit -> unit) -> unit [@@deprecated "use Signal.set_exit instead"]
14-
val handle_reload : t -> (unit -> unit) -> unit [@@deprecated "use Signal.set_reload instead"]
15-
16-
(** {2 lwt}
17-
18-
explicit interface (for compatibility)
19-
*)
20-
21-
val lwt_handle : int list -> (unit -> unit) -> unit [@@deprecated "use Signal.set instead"]
22-
val lwt_handle_exit : (unit -> unit) -> unit [@@deprecated "use Signal.set_exit instead"]
23-
val lwt_handle_reload : (unit -> unit) -> unit [@@deprecated "use Signal.set_reload instead"]
24-
2512
(** {2 generic registration} *)
2613

2714
val is_safe_output : unit -> bool

web.ml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,6 @@ module type HTTP = sig
136136
module IO : IO_TYPE
137137
val with_curl : (Curl.t -> 'a IO.t) -> 'a IO.t
138138
val with_curl_cache : (Curl.t -> 'a IO.t) -> 'a IO.t
139-
val http_gets :
140-
?setup:(Curl.t -> unit) ->
141-
?timer:Action.timer ->
142-
?max_size:int ->
143-
?check:(Curl.t -> bool) ->
144-
?result:(Curl.t -> Curl.curlCode -> unit IO.t) ->
145-
string -> [ `Error of Curl.curlCode | `Ok of int * string ] IO.t
146139

147140
type ('body,'ret) request_ = ('body,'ret IO.t) http_request_
148141
type 'ret request = 'ret IO.t http_request
@@ -360,7 +353,6 @@ module Http_lwt = Http(IO_lwt)(Curl_lwt_for_http)
360353

361354
let with_curl = Http_blocking.with_curl
362355
let with_curl_cache = Http_blocking.with_curl_cache
363-
let http_gets = Http_blocking.http_gets
364356
let http_request' = Http_blocking.http_request'
365357
let http_request = Http_blocking.http_request
366358
let http_request_exn = Http_blocking.http_request_exn

0 commit comments

Comments
 (0)