summaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/camlinternalFormat.ml40
-rw-r--r--stdlib/camlinternalFormatBasics.ml10
-rw-r--r--stdlib/camlinternalMod.ml2
-rw-r--r--stdlib/format.ml6
-rw-r--r--stdlib/int32.mli2
-rw-r--r--stdlib/int64.mli2
-rw-r--r--stdlib/nativeint.mli2
-rw-r--r--stdlib/scanf.ml8
8 files changed, 36 insertions, 36 deletions
diff --git a/stdlib/camlinternalFormat.ml b/stdlib/camlinternalFormat.ml
index 9c0574dd79..c1e25d05ef 100644
--- a/stdlib/camlinternalFormat.ml
+++ b/stdlib/camlinternalFormat.ml
@@ -403,7 +403,7 @@ let bprint_precision : type a b . buffer -> (a, b) precision -> unit =
(***)
-(* Print the optionnal '+', ' ' or '#' associated to an int conversion. *)
+(* Print the optional '+', ' ' or '#' associated to an int conversion. *)
let bprint_iconv_flag buf iconv = match iconv with
| Int_pd | Int_pi -> buffer_add_char buf '+'
| Int_sd | Int_si -> buffer_add_char buf ' '
@@ -431,7 +431,7 @@ let bprint_altint_fmt buf ign_flag iconv pad prec c =
(***)
-(* Print the optionnal '+' associated to a float conversion. *)
+(* Print the optional '+' associated to a float conversion. *)
let bprint_fconv_flag buf fconv = match fconv with
| Float_pf | Float_pe | Float_pE
| Float_pg | Float_pG | Float_ph | Float_pH ->
@@ -992,7 +992,7 @@ fun pad prec fmtty -> match prec, type_padding pad fmtty with
(* Type a format according to an fmtty. *)
(* If typing succeed, generate a copy of the format with the same
type parameters as the fmtty. *)
-(* Raise a Failure with an error message in case of type mismatch. *)
+(* Raise [Failure] with an error message in case of type mismatch. *)
let rec type_format :
type a1 b1 c1 d1 e1 f1
a2 b2 c2 d2 e2 f2 .
@@ -1304,7 +1304,7 @@ let recast :
(******************************************************************************)
(* Printing tools *)
-(* Add padding spaces arround a string. *)
+(* Add padding spaces around a string. *)
let fix_padding padty width str =
let len = String.length str in
let width, padty =
@@ -1910,9 +1910,9 @@ let rec strput_acc b acc = match acc with
| End_of_acc -> ()
(******************************************************************************)
- (* Error managment *)
+ (* Error management *)
-(* Raise a Failure with a pretty-printed error message. *)
+(* Raise [Failure] with a pretty-printed error message. *)
let failwith_message (Format (fmt, _)) =
let buf = Buffer.create 256 in
let k () acc = strput_acc buf acc; failwith (Buffer.contents buf) in
@@ -1984,7 +1984,7 @@ fun prec fmt -> match prec with
| Lit_precision p -> Precision_fmt_EBB (Lit_precision p, fmt)
| Arg_precision -> Precision_fmt_EBB (Arg_precision, fmt)
-(* Create a padprec_fmt_ebb forma a padding, a precision and a format. *)
+(* Create a padprec_fmt_ebb from a padding, a precision and a format. *)
(* Copy the padding and the precision to disjoin type parameters of arguments
and result. *)
let make_padprec_fmt_ebb : type x y z t .
@@ -2002,7 +2002,7 @@ fun pad prec fmt ->
(* Format parsing *)
(* Parse a string representing a format and create a fmt_ebb. *)
-(* Raise an Failure exception in case of invalid format. *)
+(* Raise [Failure] in case of invalid format. *)
let fmt_ebb_of_string ?legacy_behavior str =
(* Parameters naming convention: *)
(* - lit_start: start of the literal sequence. *)
@@ -2030,20 +2030,20 @@ let fmt_ebb_of_string ?legacy_behavior str =
A typical example would be "%+ d": specifying both '+' (if the
number is positive, pad with a '+' to get the same width as
- negative numbres) and ' ' (if the number is positive, pad with
+ negative numbers) and ' ' (if the number is positive, pad with
a space) does not make sense, but the legacy (< 4.02)
implementation was happy to just ignore the space.
*)
in
- (* Raise a Failure with a friendly error message. *)
+ (* Raise [Failure] with a friendly error message. *)
let invalid_format_message str_ind msg =
failwith_message
"invalid format %S: at character number %d, %s"
str str_ind msg;
in
- (* Used when the end of the format (or the current sub-format) was encoutered
+ (* Used when the end of the format (or the current sub-format) was encountered
unexpectedly. *)
let unexpected_end_of_format end_ind =
invalid_format_message end_ind
@@ -2055,7 +2055,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
invalid_format_message str_ind
"non-zero widths are unsupported for %c conversions"
in
- (* Raise Failure with a friendly error message about an option dependencie
+ (* Raise [Failure] with a friendly error message about an option dependency
problem. *)
let invalid_format_without str_ind c s =
failwith_message
@@ -2063,7 +2063,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
str str_ind c s
in
- (* Raise Failure with a friendly error message about an unexpected
+ (* Raise [Failure] with a friendly error message about an unexpected
character. *)
let expected_character str_ind expected read =
failwith_message
@@ -2196,7 +2196,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
| '0' .. '9' -> parse_literal minus str_ind
| ('+' | '-') as symb when legacy_behavior ->
(* Legacy mode would accept and ignore '+' or '-' before the
- integer describing the desired precision; not that this
+ integer describing the desired precision; note that this
cannot happen for padding width, as '+' and '-' already have
a semantics there.
@@ -2271,7 +2271,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
first pad with zeros... To add insult to the injury, the
legacy implementation ignores the 0-padding indication and
does the 5 padding with spaces instead. We reuse this
- interpretation for compatiblity, but statically reject this
+ interpretation for compatibility, but statically reject this
format when the legacy mode is disabled, to protect strict
users from this corner case. *)
match get_pad (), get_prec () with
@@ -2591,7 +2591,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
)
| _ -> ()
- (* Try to read the optionnal <name> after "@{" or "@[". *)
+ (* Try to read the optional <name> after "@{" or "@[". *)
and parse_tag : type e f . bool -> int -> int -> (_, _, e, f) fmt_ebb =
fun is_open_tag str_ind end_ind ->
try
@@ -2617,7 +2617,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
if is_open_tag then Open_tag sub_format else Open_box sub_format in
Fmt_EBB (Formatting_gen (formatting, fmt_rest))
- (* Try to read the optionnal <width offset> after "@;". *)
+ (* Try to read the optional <width offset> after "@;". *)
and parse_good_break : type e f . int -> int -> (_, _, e, f) fmt_ebb =
fun str_ind end_ind ->
let next_ind, formatting_lit =
@@ -2924,7 +2924,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
else incompatible_flag pct_ind str_ind symb "'+'"
| false, false, _ -> assert false
- (* Raise a Failure with a friendly error message about incompatible options.*)
+ (* Raise [Failure] with a friendly error message about incompatible options.*)
and incompatible_flag : type a . int -> int -> char -> string -> a =
fun pct_ind str_ind symb option ->
let subfmt = String.sub str pct_ind (str_ind - pct_ind) in
@@ -2939,7 +2939,7 @@ let fmt_ebb_of_string ?legacy_behavior str =
(* Guarded string to format conversions *)
(* Convert a string to a format according to an fmtty. *)
-(* Raise a Failure with an error message in case of type mismatch. *)
+(* Raise [Failure] with an error message in case of type mismatch. *)
let format_of_string_fmtty str fmtty =
let Fmt_EBB fmt = fmt_ebb_of_string str in
try Format (type_format fmt fmtty, str)
@@ -2949,7 +2949,7 @@ let format_of_string_fmtty str fmtty =
str (string_of_fmtty fmtty)
(* Convert a string to a format compatible with an other format. *)
-(* Raise a Failure with an error message in case of type mismatch. *)
+(* Raise [Failure] with an error message in case of type mismatch. *)
let format_of_string_format str (Format (fmt', str')) =
let Fmt_EBB fmt = fmt_ebb_of_string str in
try Format (type_format fmt (fmtty_of_fmt fmt'), str)
diff --git a/stdlib/camlinternalFormatBasics.ml b/stdlib/camlinternalFormatBasics.ml
index 9dbd563d7a..79ec828910 100644
--- a/stdlib/camlinternalFormatBasics.ml
+++ b/stdlib/camlinternalFormatBasics.ml
@@ -189,7 +189,7 @@ to transpose between related format types.
NOTE [1]: the typing of Format_subst_ty requires not one format type, but
two, one to establish the link between the format argument and the
first six parameters, and the other for the link between the format
-argumant and the last six parameters.
+argument and the last six parameters.
| Format_subst_ty : (* %(...%) *)
('g, 'h, 'i, 'j, 'k, 'l,
@@ -214,7 +214,7 @@ function that proves that the relation is transitive
-> ('a1, 'b1, 'c1, 'd1, 'e1, 'f1,
'a3, 'b3, 'c3, 'd3, 'e3, 'f3) fmtty_rel
-does assume that the two input have exactly the same term structure
+does assume that the two inputs have exactly the same term structure
(and is only every used for argument witnesses of the
Format_subst_ty constructor).
*)
@@ -232,7 +232,7 @@ type block_type =
when it leads to a new indentation of the current line *)
| Pp_fits (* Internal usage: when a block fits on a single line *)
-(* Formatting element used by the Format pretty-printter. *)
+(* Formatting element used by the Format pretty-printer. *)
type formatting_lit =
| Close_box (* @] *)
| Close_tag (* @} *)
@@ -245,7 +245,7 @@ type formatting_lit =
| Escaped_percent (* @%% *)
| Scan_indic of char (* @X *)
-(* Formatting element used by the Format pretty-printter. *)
+(* Formatting element used by the Format pretty-printer. *)
type ('a, 'b, 'c, 'd, 'e, 'f) formatting_gen =
| Open_tag : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> (* @{ *)
('a, 'b, 'c, 'd, 'e, 'f) formatting_gen
@@ -452,7 +452,7 @@ and ('a, 'b, 'c, 'd, 'e, 'f) fmt =
We include a type Custom of "custom converters", where an
arbitrary function can be used to convert one or more
arguments. There is no syntax for custom converters, it is only
- inteded for custom processors that wish to rely on the
+ intended for custom processors that wish to rely on the
stdlib-defined format GADTs.
For instance a pre-processor could choose to interpret strings
diff --git a/stdlib/camlinternalMod.ml b/stdlib/camlinternalMod.ml
index 9e2619263e..5ccf92893b 100644
--- a/stdlib/camlinternalMod.ml
+++ b/stdlib/camlinternalMod.ml
@@ -50,7 +50,7 @@ let rec update_mod shape o n =
match shape with
| Function ->
if Obj.tag n = Obj.closure_tag && Obj.size n <= Obj.size o
- then begin overwrite o n; Obj.truncate o (Obj.size n) (* PR #4008 *) end
+ then begin overwrite o n; Obj.truncate o (Obj.size n) (* PR#4008 *) end
else overwrite o (Obj.repr (fun x -> (Obj.obj n : _ -> _) x))
| Lazy ->
if Obj.tag n = Obj.lazy_tag then
diff --git a/stdlib/format.ml b/stdlib/format.ml
index 4d4ab9cb88..e02ffae1f2 100644
--- a/stdlib/format.ml
+++ b/stdlib/format.ml
@@ -734,7 +734,7 @@ and pp_open_box state indent = pp_open_box_gen state indent Pp_box
(* Printing queued text.
[pp_print_flush] prints all pending items in the pretty-printer queue and
- then flushes the the low level output device of the formatter to effectively
+ then flushes the low level output device of the formatter to actually
display printing material.
[pp_print_newline] behaves as [pp_print_flush] after printing an additional
@@ -950,7 +950,7 @@ let default_pp_mark_close_tag s = "</" ^ s ^ ">"
let default_pp_print_open_tag = ignore
let default_pp_print_close_tag = ignore
-(* Bulding a formatter given its basic output functions.
+(* Building a formatter given its basic output functions.
Other fields get reasonable default values. *)
let pp_make_formatter f g h i j =
(* The initial state of the formatter contains a dummy box. *)
@@ -1041,7 +1041,7 @@ and str_formatter = formatter_of_buffer stdbuf
(* [flush_buffer_formatter buf ppf] flushes formatter [ppf],
- then return the contents of buffer [buff] thst is reset.
+ then returns the contents of buffer [buf] that is reset.
Formatter [ppf] is supposed to print to buffer [buf], otherwise this
function is not really useful. *)
let flush_buffer_formatter buf ppf =
diff --git a/stdlib/int32.mli b/stdlib/int32.mli
index f27d8c911c..745cc35828 100644
--- a/stdlib/int32.mli
+++ b/stdlib/int32.mli
@@ -84,7 +84,7 @@ external logxor : int32 -> int32 -> int32 = "%int32_xor"
(** Bitwise logical exclusive or. *)
val lognot : int32 -> int32
-(** Bitwise logical negation *)
+(** Bitwise logical negation. *)
external shift_left : int32 -> int -> int32 = "%int32_lsl"
(** [Int32.shift_left x y] shifts [x] to the left by [y] bits.
diff --git a/stdlib/int64.mli b/stdlib/int64.mli
index 8ee2669c67..97a407072c 100644
--- a/stdlib/int64.mli
+++ b/stdlib/int64.mli
@@ -84,7 +84,7 @@ external logxor : int64 -> int64 -> int64 = "%int64_xor"
(** Bitwise logical exclusive or. *)
val lognot : int64 -> int64
-(** Bitwise logical negation *)
+(** Bitwise logical negation. *)
external shift_left : int64 -> int -> int64 = "%int64_lsl"
(** [Int64.shift_left x y] shifts [x] to the left by [y] bits.
diff --git a/stdlib/nativeint.mli b/stdlib/nativeint.mli
index 683be52940..dc69017594 100644
--- a/stdlib/nativeint.mli
+++ b/stdlib/nativeint.mli
@@ -99,7 +99,7 @@ external logxor : nativeint -> nativeint -> nativeint = "%nativeint_xor"
(** Bitwise logical exclusive or. *)
val lognot : nativeint -> nativeint
-(** Bitwise logical negation *)
+(** Bitwise logical negation. *)
external shift_left : nativeint -> int -> nativeint = "%nativeint_lsl"
(** [Nativeint.shift_left x y] shifts [x] to the left by [y] bits.
diff --git a/stdlib/scanf.ml b/stdlib/scanf.ml
index 7be353a1f3..033ff0c061 100644
--- a/stdlib/scanf.ml
+++ b/stdlib/scanf.ml
@@ -410,7 +410,7 @@ module Scanning : SCANNING = struct
More precisely, given [ic], all successive calls [fscanf ic] must read
from the same scanning buffer.
This obliged this library to allocated scanning buffers that were
- not properly garbbage collectable, hence leading to memory leaks.
+ not properly garbage collectable, hence leading to memory leaks.
If you need to read from a [Pervasives.in_channel] input channel
[ic], simply define a [Scanning.in_channel] formatted input channel as in
[let ib = Scanning.from_channel ic], then use [Scanf.bscanf ib] as usual.
@@ -655,7 +655,7 @@ let scan_digit_star digitp width ib =
let scan_digit_plus basis digitp width ib =
(* Ensure we have got enough width left,
- and read at list one digit. *)
+ and read at least one digit. *)
if width = 0 then bad_token_length "digits" else
let c = Scanning.checked_peek_char ib in
if digitp c then
@@ -1188,7 +1188,7 @@ let stopper_of_formatting_lit fmting =
(******************************************************************************)
- (* Readers managment *)
+ (* Reader management *)
(* A call to take_format_readers on a format is evaluated into functions
taking readers as arguments and aggregate them into an heterogeneous list *)
@@ -1296,7 +1296,7 @@ fun k ign fmt -> match ign with
(* Make a generic scanning function. *)
(* Scan a stream according to a format and readers obtained by
- take_format_readers, and aggegate scanned values into an
+ take_format_readers, and aggregate scanned values into an
heterogeneous list. *)
(* Return the heterogeneous list of scanned values. *)
let rec make_scanf : type a c d e f.