Skip to content
Snippets Groups Projects
Commit 09dbe850 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

replace occurrences of Pervasives with Stdlib

parent 22807efc
No related branches found
No related tags found
No related merge requests found
......@@ -1235,8 +1235,8 @@ and user-friendly way.
As a general rule, you should \emph{never} write to standard output
and error channels through \ocaml standard libraries. For instance,
you should never use \texttt{Pervasives.stdout} and
\texttt{Pervasives.stderr} channels, nor \texttt{Format.printf}-like
you should never use \texttt{Stdlib.stdout} and
\texttt{Stdlib.stderr} channels, nor \texttt{Format.printf}-like
routines.
Instead, you should use \texttt{Format.fprintf} to implement
......@@ -1615,7 +1615,7 @@ allows you to create such channels for your own purposes.
Basically, \emph{channels} ensure that no message emission interfere
with each others during echo on standard output. Hence the forbidden
direct access to \lstinline{Pervasives.stdout}. However,
direct access to \lstinline{Stdlib.stdout}. However,
\lstinline{Log} interface allows you to create such channels on your
own, in addition to the one automatically created for your plug-in.
......@@ -1665,7 +1665,7 @@ another channel:
\end{description}
It is also possible to have a momentary direct access to
\lstinline{Pervasives.stdout}, or whatever its redirection is:
\lstinline{Stdlib.stdout}, or whatever its redirection is:
\begin{description}
%%item
\logroutine{print\_on\_output}{ "..."}%
......@@ -1843,7 +1843,7 @@ module AB =
(Structural_desr.Sum [| [| Structural_descr.p_int |] |])
(* equality, compare and hash are the standard OCaml ones *)
let equal (x:t) y = x = y
let compare (x:t) y = Pervasives.compare x y
let compare (x:t) y = Stdlib.compare x y
let hash (x:t) = Hashtbl.hash x
(* the type ab is a standard functional type, thus copying and rehashing
are simply identity. Rehashing is used when marshaling. *)
......@@ -1967,7 +1967,7 @@ module Poly_ab =
| A _, B _ | B _, A _ -> false
let mk_compare f x y = match x, y with
| A x, A y -> f x y
| B x, B y -> Pervasives.compare x y
| B x, B y -> Stdlib.compare x y
| A _, B _ -> 1
| B _, A _ -> -1
let mk_hash f = function A x -> f x | B x -> 257 * x
......
......@@ -338,8 +338,6 @@ struct
(** {3 String} *)
(* ************************************************************************ *)
module Pervasives_string = String
module String
(X: sig include Parameter_sig.Input_with_arg val default: string end) =
struct
......@@ -711,7 +709,7 @@ struct
(* return the list of tokens, in reverse order *)
let parse s =
let len = Pervasives_string.length s in
let len = Stdlib.String.length s in
let rec aux acc pos i s =
if i = len then acc
else
......@@ -730,7 +728,7 @@ struct
read_char_in_word
(fun acc -> add_char c (add_char '\\' acc)) (Word false)
in
match Pervasives_string.get s i, pos with
match Stdlib.String.get s i, pos with
| '+', Start when use_category ->
aux (add_action Add acc) (Word true) next s
| '-', Start when use_category ->
......@@ -1552,7 +1550,7 @@ struct
in
let r = Str.regexp "[^:]:[^:]" in
let split_delim d =
(Pervasives_string.sub d 0 1, Pervasives_string.sub d 2 1)
(Stdlib.String.sub d 0 1, Stdlib.String.sub d 2 1)
in
let remove_none_and_rev l =
List.fold_left
......
......@@ -66,10 +66,10 @@ module type S_no_copy = sig
(** List of representants of the descriptor. *)
val equal: t -> t -> bool
(** Equality: same spec than [Pervasives.(=)]. *)
(** Equality: same spec than [Stdlib.(=)]. *)
val compare: t -> t -> int
(** Comparison: same spec than [Pervasives.compare]. *)
(** Comparison: same spec than [Stdlib.compare]. *)
val hash: t -> int
(** Hash function: same spec than [Hashtbl.hash]. *)
......
......@@ -33,7 +33,7 @@ module type S = sig
val iter_sorted:
?cmp:(key -> key -> int) -> (key -> 'a -> unit) -> 'a t -> unit
(** Iter on the hashtbl, but respecting the order on keys induced
by [cmp]. Use [Pervasives.compare] if [cmp] not given.
by [cmp]. Use [Stdlib.compare] if [cmp] not given.
If the table contains several bindings for the same key, they
are passed to [f] in reverse order of introduction, that is,
......@@ -42,7 +42,7 @@ module type S = sig
val fold_sorted:
?cmp:(key -> key -> int) -> (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
(** Fold on the hashtbl, but respecting the order on keys induced
by [cmp]. Use [Pervasives.compare] if [cmp] not given.
by [cmp]. Use [Stdlib.compare] if [cmp] not given.
If the table contains several bindings for the same key, they
are passed to [f] in reverse order of introduction, that is,
......
......@@ -351,9 +351,9 @@ val mkdir : ?parents:bool -> string -> Unix.file_perm -> unit
@since 19.0-Potassium *)
val safe_at_exit : (unit -> unit) -> unit
(** Register function to call with [Pervasives.at_exit], but only
(** Register function to call with [Stdlib.at_exit], but only
for non-child process (fork). The order of execution is preserved
{i wrt} ordinary calls to [Pervasives.at_exit]. *)
{i wrt} ordinary calls to [Stdlib.at_exit]. *)
val cleanup_at_exit: string -> unit
(** [cleanup_at_exit file] indicates that [file] must be removed when the
......@@ -386,7 +386,7 @@ val safe_remove_dir: string -> unit
(** Comparison functions *)
(* ************************************************************************* *)
(** Use this function instead of [Pervasives.compare], as this makes
(** Use this function instead of [Stdlib.compare], as this makes
it easier to find incorrect uses of the latter *)
external compare_basic: 'a -> 'a -> int = "%compare"
......
......@@ -44,8 +44,8 @@ type json =
| `String of string ]
type t = json
val equal : t -> t -> bool (** Pervasives *)
val compare : t -> t -> int (** Pervasives *)
val equal : t -> t -> bool (** Stdlib *)
val compare : t -> t -> int (** Stdlib *)
val pp : Format.formatter -> t -> unit
val pp_dump : Format.formatter -> t -> unit (** without formatting *)
......
......@@ -151,7 +151,7 @@ module Configuration: sig
val config_values : key:string -> default:'a ->
values:('a * string) list -> 'a #selector -> unit
(** The [values] field is used as a dictionary of available values.
They are compared with [Pervasives.(=)]. *)
They are compared with [Stdlib.(=)]. *)
end
......
......@@ -34,7 +34,7 @@ type setup = {
cfloat : Cfloat.model ;
}
(*[LC] All types in [model] must be Pervasives-comparable *)
(*[LC] All types in [model] must be Stdlib-comparable *)
type driver = LogicBuiltins.driver
......
......@@ -26,7 +26,7 @@
(**
Structural representation of logic labels.
Compatible with pervasives comparison and structural equality.
Compatible with stdlib comparison and structural equality.
*)
type c_label
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment