Skip to content

Commit 7355895

Browse files
Merge pull request #954 from MisterDA/pervasives-stdlib
Change mentions of Pervasives to Stdlib
2 parents b533a46 + c9cd752 commit 7355895

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* Improve documentation (especially internal links). (#928, Antonin Décimo)
2020
* Fix documentation of infix choose. (#952, Reynir Björnsson)
2121
* Only define OCAML_NAME_SPACE for OCaml<5.0.0. (#929, Antonin Décimo)
22+
* Replace mentions of Pervasives with Stdlib in the doc. (#954, Antonin Décimo)
2223

2324
====== Fixes ======
2425

docs/manual.wiki

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
5959
=== Lwt concepts ===
6060

61-
Let's take a classic function of the {{{Pervasives}}} module:
61+
Let's take a classic function of the {{{Stdlib}}} module:
6262
63-
<<code language="ocaml" |# Pervasives.input_char;;
63+
<<code language="ocaml" |# Stdlib.input_char;;
6464
- : in_channel -> char = <fun>
6565
>>
6666

@@ -202,7 +202,7 @@ val p : char Lwt.t = <abstr>
202202
{{{catch f g}}} will call {{{f ()}}}, then wait for it to become
203203
resolved, and if it was rejected with an exception {{{exn}}}, call
204204
{{{g exn}}} to handle it. Note that both exceptions raised with
205-
{{{Pervasives.raise}}} and {{{Lwt.fail}}} are caught by
205+
{{{Stdlib.raise}}} and {{{Lwt.fail}}} are caught by
206206
{{{catch}}}.
207207
208208
==== Cancelable promises ====

src/core/lwt.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
A resolved promise is either "fulfilled" with a value, or "rejected" with
116116
an exception. The state of a resolved promise will never change again: a
117117
resolved promise is immutable. A resolved promise is basically equivalent
118-
to an [('a, exn) Pervasives.result]. Resolved promises are produced in two
118+
to an [('a, exn) Stdlib.result]. Resolved promises are produced in two
119119
ways:
120120
121121
- [Lwt.return], [Lwt.fail], and related functions, produce "trivial"
@@ -478,7 +478,7 @@ struct
478478
479479
- The type parameters of ['a resolved_state] guarantee that it is either
480480
[Fulfilled _] or [Rejected _]. So, it is equivalent to
481-
[('a, exn) Pervasives.result], and, indeed, should have an identical
481+
[('a, exn) Stdlib.result], and, indeed, should have an identical
482482
memory representation.
483483
484484
- As per the Overview, there are regular callbacks and cancel callbacks.
@@ -574,7 +574,7 @@ struct
574574

575575
(* Internal name of the public [+'a Lwt.result]. The public name is defined
576576
later in the module. This is to avoid potential confusion with
577-
[Pervasives.result]/[Result.result], as the public name would not be
577+
[Stdlib.result]/[Result.result], as the public name would not be
578578
prefixed with [Lwt.] inside this file. *)
579579
type +'a lwt_result = ('a, exn) Result.t
580580

src/core/lwt.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ let () =
347347
348348
- {!Lwt_unix} for Unix system calls.
349349
- {!Lwt_bytes} for Unix system calls on bigarrays.
350-
- {!Lwt_io} for [Pervasives]-like high-level channels, TCP servers, etc.
350+
- {!Lwt_io} for [Stdlib]-like high-level channels, TCP servers, etc.
351351
- {!Lwt_process} for managing subprocesses.
352352
- {!Lwt_preemptive} for spawning system threads.
353353
- Miscellaneous modules {!Lwt_gc}, {!Lwt_engine}, {!Lwt_throttle},

src/core/lwt_stream.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ let rec get_exn_rec s node =
459459
(fun () -> get_exn_rec s node)
460460
(fun exn -> Lwt.return (Some (Error exn : _ result)))
461461
(* Note: the [Error] constructor above is from [Lwt_stream.result], not
462-
[Pervasives.result], nor its alias [Lwt.result]. [Lwt_stream.result] is
462+
[Stdlib.result], nor its alias [Lwt.result]. [Lwt_stream.result] is
463463
a deprecated type, defined right above this function.
464464
465465
The type constraint is necessary to avoid a warning about an ambiguous

src/unix/lwt_main.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ let () = Lwt_main.run (main ())
4040
error (i.e., code making such a call is inherently broken).
4141
4242
It is not safe to call [Lwt_main.run] in a function registered with
43-
[Pervasives.at_exit], use {!Lwt_main.at_exit} instead. *)
43+
[Stdlib.at_exit], use {!Lwt_main.at_exit} instead. *)
4444

4545
val yield : unit -> unit Lwt.t [@@deprecated "Use Lwt.pause instead"]
4646
(** [yield ()] is a pending promise that is fulfilled after Lwt finishes

0 commit comments

Comments
 (0)