summaryrefslogtreecommitdiff
path: root/stdlib/ephemeron.mli
diff options
context:
space:
mode:
authorFourchaux <jprodi04@gmail.com>2016-02-04 15:44:52 +0100
committerDamien Doligez <damien.doligez@inria.fr>2016-02-05 13:20:30 +0100
commit5ec086870f9ce002dab4315e140e3f63f1f6a4bf (patch)
tree45973ebb9999b9b62216ccb93ccd21702a987d26 /stdlib/ephemeron.mli
parentb12e708ef46e3272beed4921f594feeb9c03a7ae (diff)
downloadocaml-5ec086870f9ce002dab4315e140e3f63f1f6a4bf.tar.gz
Typos - ephemerons
Diffstat (limited to 'stdlib/ephemeron.mli')
-rw-r--r--stdlib/ephemeron.mli30
1 files changed, 15 insertions, 15 deletions
diff --git a/stdlib/ephemeron.mli b/stdlib/ephemeron.mli
index add6989d95..8e8b6eaf34 100644
--- a/stdlib/ephemeron.mli
+++ b/stdlib/ephemeron.mli
@@ -15,12 +15,12 @@
(** Ephemerons and weak hash table
- Ephemerons and weak hashtable are useful when one wants to cache
+ Ephemerons and weak hash table are useful when one wants to cache
or memorize the computation of a function, as long as the
arguments and the function are used, without creating memory leaks
by continuously keeping old computation results that are not
useful anymore because one argument or the function is freed. An
- implementation using {Hashtbl.t} is not suitable, because all
+ implementation using {Hashtbl.t} is not suitable because all
associations would keep in memory the arguments and the result.
Ephemerons can also be used for "adding" a field to an arbitrary
@@ -28,13 +28,13 @@
created by an external library without memory leaks.
Ephemerons hold some keys and one or no data. They are all boxed
- ocaml values. The keys of an ephemerons have the same behavior
+ ocaml values. The keys of an ephemeron have the same behavior
than weak pointers according to the garbage collector. In fact
ocaml weak pointers are implemented as ephemerons without data.
The keys and data of an ephemeron are said to be full if they
point to a value, empty if the value have never been set, have
- been unset, or was erased by the GC. In the function that access
+ been unset, or was erased by the GC. In the function that accesses
the keys or data these two states are represented by the [option]
type.
@@ -42,7 +42,7 @@
full keys are alive and if the ephemeron is alive. When one of the
keys is not considered alive anymore by the GC, the data is
emptied from the ephemeron. The data could be alive for another
- reason and in that case the GC will free it, but the ephemerons
+ reason and in that case the GC will free it, but the ephemeron
will not hold the data anymore.
The ephemerons complicate the notion of liveness of values, because
@@ -56,7 +56,7 @@
Notes:
- All the types defined in this module cannot be marshaled
- using {!Pervasives.output_value} nor the functions of the
+ using {!Pervasives.output_value} or the functions of the
{!Marshal} module.
Ephemerons are defined in a language agnostic way in this paper:
@@ -65,13 +65,13 @@
*)
module type S = sig
- (** Propose the same interface than usual hash table. However since
+ (** Propose the same interface as usual hash table. However since
the bindings are weak, [mem h k] is true doesn't mean that a
just following [find h k] will not raise the exception
[Not_found] since the garbage collector can run between the two.
- Secondly during an iteration the table shouldn't be modified use
- instead {!filter_map_inplace} for that purpose.
+ Secondly during an iteration the table shouldn't be modified.
+ Instead use {!filter_map_inplace} for that purpose.
*)
include Hashtbl.S
@@ -102,7 +102,7 @@ module K1 : sig
val create: unit -> ('k,'d) t
(** [Ephemeron.K1.create ()] creates an ephemeron with one key. The
- data and key are empty *)
+ data and the key are empty *)
val get_key: ('k,'d) t -> 'k option
(** [Ephemeron.K1.get_key eph] returns [None] if the key of [eph] is
@@ -121,8 +121,8 @@ module K1 : sig
val unset_key: ('k,'d) t -> unit
(** [Ephemeron.K1.unset_key eph el] sets the key of [eph] to be an
- empty key. Since there is only one key, the ephemeron start
- behaving like a references on the data. *)
+ empty key. Since there is only one key, the ephemeron starts
+ behaving like a reference on the data. *)
val check_key: ('k,'d) t -> bool
(** [Ephemeron.K1.check_key eph] returns [true] if the key of the [eph]
@@ -156,7 +156,7 @@ module K1 : sig
val unset_data: ('k,'d) t -> unit
(** [Ephemeron.K1.unset_key eph el] sets the key of [eph] to be an
- empty key. The ephemeron start behaving like a weak pointer.
+ empty key. The ephemeron starts behaving like a weak pointer.
*)
val check_data: ('k,'d) t -> bool
@@ -247,7 +247,7 @@ end
module Kn : sig
type ('k,'d) t (** an ephemeron with an arbitrary number of keys
- of the same types *)
+ of the same type *)
val create: int -> ('k,'d) t
(** Same as {!Ephemeron.K1.create} *)
@@ -293,7 +293,7 @@ module Kn : sig
end
module GenHashTable: sig
- (** Define hash table on generic containers which have a notion of
+ (** Define an hash table on generic containers which have a notion of
"death" and aliveness. If a binding is dead the hash table can
automatically remove it. *)