Skip to content

Commit 74cfffe

Browse files
committed
clean up deprecated features
1 parent 31ac8b5 commit 74cfffe

15 files changed

+26
-43
lines changed

stdlib/lm_imp_dag.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ struct
303303
loop searched t
304304
else
305305
let edges = select entries.(node) in
306-
loop (node :: searched) (List.merge Pervasives.compare edges t)
306+
loop (node :: searched) (List.merge Stdlib.compare edges t)
307307
| [] ->
308308
false
309309
in

stdlib/lm_nocompare.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(*
2-
* A special "custom" value that prohibits Pervasives.compare,
2+
* A special "custom" value that prohibits Stdlib.compare,
33
* but allows marshalling. By temporarily adding Lm_nocompare.it as a
44
* _first_ field in a * data structure that is not supposed to be
5-
* compared using Pervasives.compare, one can weed out all the
5+
* compared using Stdlib.compare, one can weed out all the
66
* inappropriate usages of Pervasives.compare, (=), (<), etc.
77
*
88
* ------------------------------------------------

stdlib/lm_printf.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(*
2-
* Override Pervasives IO with Format IO
2+
* Override Printf from OCaml
33
*
44
* ----------------------------------------------------------------
55
*
@@ -186,7 +186,6 @@ let printf = printf
186186
let eprintf = eprintf
187187
let sprintf = sprintf
188188
let fprintf = fprintf
189-
let bprintf = bprintf
190189

191190
(*
192191
* Formatting functions.

stdlib/lm_printf.mli

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ val eprintf : ('a, out_channel, unit) format -> 'a
7878
val printf : ('a, out_channel, unit) format -> 'a
7979
val sprintf : ('a, unit, string) format -> 'a
8080
val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a
81-
val bprintf : Buffer.t -> ('a, out_channel, unit) format -> 'a
8281

8382
(*
8483
* List printing helpers.
@@ -159,7 +158,7 @@ val get_ellipsis_text : unit -> string
159158
(*
160159
* Redirecting formatter output.
161160
*)
162-
val set_formatter_out_channel : Pervasives.out_channel -> unit
161+
val set_formatter_out_channel : Stdlib.out_channel -> unit
163162
val set_formatter_output_functions : (string -> int -> int -> unit) -> (unit -> unit) -> unit
164163
val get_formatter_output_functions : unit -> (string -> int -> int -> unit) * (unit -> unit)
165164

@@ -170,19 +169,12 @@ val set_all_formatter_output_functions :
170169
(int -> unit) ->
171170
unit
172171

173-
val get_all_formatter_output_functions :
174-
unit ->
175-
(string -> int -> int -> unit) *
176-
(unit -> unit) *
177-
(unit -> unit) *
178-
(int -> unit)
179-
180172
(*
181173
* Multiple formatted output.
182174
*)
183175
type formatter = out_channel
184176

185-
val formatter_of_out_channel : Pervasives.out_channel -> formatter
177+
val formatter_of_out_channel : Stdlib.out_channel -> formatter
186178
val std_formatter : formatter
187179
val err_formatter : formatter
188180
val str_formatter : formatter
@@ -199,7 +191,7 @@ val make_formatter : (string -> int -> int -> unit) -> (unit -> un
199191
* [|PID1: string1|][|PID2: string2|]...
200192
* (with consequetive non-NL strings from the same PID merged together).
201193
*)
202-
val extra_formatting : string -> Pervasives.out_channel -> formatter -> unit
194+
val extra_formatting : string -> Stdlib.out_channel -> formatter -> unit
203195

204196
val pp_open_hbox : formatter -> unit -> unit
205197
val pp_open_vbox : formatter -> int -> unit
@@ -234,7 +226,7 @@ val pp_get_max_boxes : formatter -> unit -> int
234226
val pp_over_max_boxes : formatter -> unit -> bool
235227
val pp_set_ellipsis_text : formatter -> string -> unit
236228
val pp_get_ellipsis_text : formatter -> unit -> string
237-
val pp_set_formatter_out_channel : formatter -> Pervasives.out_channel -> unit
229+
val pp_set_formatter_out_channel : formatter -> Stdlib.out_channel -> unit
238230

239231
val pp_set_formatter_output_functions :
240232
formatter -> (string -> int -> int -> unit) -> (unit -> unit) -> unit
@@ -250,14 +242,6 @@ val pp_set_all_formatter_output_functions :
250242
(int -> unit) ->
251243
unit
252244

253-
val pp_get_all_formatter_output_functions :
254-
formatter ->
255-
unit ->
256-
(string -> int -> int -> unit) *
257-
(unit -> unit) *
258-
(unit -> unit) *
259-
(int -> unit)
260-
261245
(*
262246
* Allow the use of the Format modules.
263247
*)

stdlib/lm_rprintf.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ val get_ellipsis_text : unit -> string
169169
(*
170170
* Redirecting formatter output.
171171
*)
172-
val set_formatter_out_channel : Pervasives.out_channel -> unit
172+
val set_formatter_out_channel : Stdlib.out_channel -> unit
173173
val set_formatter_output_functions : (string -> int -> int -> unit) -> (unit -> unit) -> unit
174174
val get_formatter_output_functions : unit -> (string -> int -> int -> unit) * (unit -> unit)
175175

@@ -192,7 +192,7 @@ val get_all_formatter_output_functions :
192192
*)
193193
type formatter = out_channel
194194

195-
val formatter_of_out_channel : Pervasives.out_channel -> formatter
195+
val formatter_of_out_channel : Stdlib.out_channel -> formatter
196196
val std_formatter : formatter
197197
val err_formatter : formatter
198198
val str_formatter : formatter
@@ -235,7 +235,7 @@ val pp_get_max_boxes : formatter -> unit -> int
235235
val pp_over_max_boxes : formatter -> unit -> bool
236236
val pp_set_ellipsis_text : formatter -> string -> unit
237237
val pp_get_ellipsis_text : formatter -> unit -> string
238-
val pp_set_formatter_out_channel : formatter -> Pervasives.out_channel -> unit
238+
val pp_set_formatter_out_channel : formatter -> Stdlib.out_channel -> unit
239239

240240
val pp_set_formatter_output_functions :
241241
formatter -> (string -> int -> int -> unit) -> (unit -> unit) -> unit

stdlib/lm_serial_map.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module SerialMapMake (Base : OrderedType) : SerialMap with type key = Base.t =
6262
struct
6363
module IntModule = struct
6464
type t = int
65-
let compare = Pervasives.compare
65+
let compare = Stdlib.compare
6666
end
6767

6868
module SMap = LmMake (IntModule)

stdlib/lm_string_set.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module StringMTable = Lm_map.LmMakeList (OrderedString)
4747
*)
4848
module LexOrderedString = struct
4949
type t = string
50-
let compare (s1: t) s2 = Pervasives.compare s1 s2
50+
let compare (s1: t) s2 = Stdlib.compare s1 s2
5151
end
5252

5353
module LexStringSet = Lm_set.LmMake (LexOrderedString)

stdlib/lm_string_util.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ let rec string_compare_aux s1 s2 len i =
5959
if c1 = c2 then
6060
string_compare_aux s1 s2 len (i+1)
6161
else
62-
Pervasives.compare c1 c2
62+
Stdlib.compare c1 c2
6363

6464
let string_compare s1 s2 =
6565
let len1 = String.length s1 in
66-
match Pervasives.compare len1 (String.length s2) with
66+
match Stdlib.compare len1 (String.length s2) with
6767
0 -> string_compare_aux s1 s2 len1 0
6868
| i -> i
6969

unix/lm_mmap_pipe.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ let create_server dir =
200200
(try Unix.unlink bufname with Unix.Unix_error _ -> ());
201201
(try Unix.unlink sockname with Unix.Unix_error _ -> ())
202202
in
203-
Pervasives.at_exit at_exit;
203+
Stdlib.at_exit at_exit;
204204
Unix.bind sock (Unix.ADDR_UNIX sockname);
205205
Unix.listen sock 1;
206206
set_int buf (0 + full_offset) 0;

unix/lm_notify.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ end
5252
module StringCompare =
5353
struct
5454
type t = string
55-
let compare = Pervasives.compare
55+
let compare = Stdlib.compare
5656
end
5757

5858
module IntTable = Lm_map.LmMake (IntCompare)

0 commit comments

Comments
 (0)