Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing basic typos #890

Merged
merged 1 commit into from
Apr 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ env:
# notifications:
# email:
# - simon.cruanes.2007+travis@m4x.org
# - add other adresses here (or batteries-devel or something?)
# - add other addresses here (or batteries-devel or something?)
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ then it is only available under OCaml 4.03.0.
- basic .merlin file for merlin users
- BatDeque.eq function to compare Deques by content
- BatteriesExceptionless
- More explicit overridding of ocamlbuild rules, use batteries.mllib
- More explicit overriding of ocamlbuild rules, use batteries.mllib
- Add Kahan summation (numerically-accurate sum of floats) to List,Array,Enum
- Add BatOption.some
- (text) improve element indexing in BatList's mli documentation
Expand Down
2 changes: 1 addition & 1 deletion battop.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*
* Top - An interpreted preambule for the toplevel
* Top - An interpreted preamble for the toplevel
* Copyright (C) 2009 David Rajchenbach-Teller, LIFO, Universite d'Orleans
*
* This library is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion benchsuite/bench_nreplace.ml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ let nreplace_thelema2 ~str ~sub ~by =
loop_copy 0 0 idxes ;
newstr

(* Independantly, MadRoach implemented the same idea with less luck aparently *)
(* Independently, MadRoach implemented the same idea with less luck apparently *)
let nreplace_madroach ~str ~sub ~by =
let strlen = String.length str
and sublen = String.length sub
Expand Down
2 changes: 1 addition & 1 deletion build/odoc_batteries_factored.ml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let has_parent a ~parent:b =
result

let merge_info_opt a b =
verbose ("Merging informations");
verbose ("Merging information");
if a <> b then
begin
verbose ("1: "^(string_of_info_opt a));
Expand Down
2 changes: 1 addition & 1 deletion build/odoc_generator_batlib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ let has_parent a ~parent:b =
let roots = ["Batteries"]

let merge_info_opt a b =
verbose ("Merging informations");
verbose ("Merging information");
if a <> b then
begin
verbose ("1: "^(string_of_info_opt a));
Expand Down
8 changes: 4 additions & 4 deletions build/optcomp/pa_optcomp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ let add_include_dir dir = dirs := dir :: !dirs

module String_set = Set.Make(String)

(* All depencies of the file being parsed *)
(* All dependencies of the file being parsed *)
let dependencies = ref String_set.empty

(* Where to write dependencies *)
Expand Down Expand Up @@ -302,7 +302,7 @@ let rec parse_eol stream =
| _ ->
Loc.raise loc (Stream.Error "end of line expected")

(* Return wether a keyword can be interpreted as an identifier *)
(* Return whether a keyword can be interpreted as an identifier *)
let keyword_is_id str =
let rec aux i =
if i = String.length str then
Expand Down Expand Up @@ -516,13 +516,13 @@ type state = {
(* Input stream *)

mutable bol : bool;
(* Wether we are at the beginning of a line *)
(* Whether we are at the beginning of a line *)

mutable stack : context list;
(* Nested contexts *)

on_eoi : Gram.Token.t * Loc.t -> Gram.Token.t * Loc.t;
(* Eoi handler, it is used to restore the previous sate on #include
(* Eoi handler, it is used to restore the previous state on #include
directives *)
}

Expand Down
4 changes: 2 additions & 2 deletions build/optcomp/sample.ml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ type t = private int
type t
#endif

(* It is also possible to split the expression over multible lines by
(* It is also possible to split the expression over multiple lines by
using parentheses: *)

#let ocaml_major_version = fst ocaml_version
Expand All @@ -101,7 +101,7 @@ let x = 1
is what is allowed:

- litterals booleans, integers, strings and characters:
- basic interger operations: +, -, /, *, mod
- basic integer operations: +, -, /, *, mod
- value comparing: =, <>, <, >, <=, >=
- maximum and minimum: max, min
- basic boolean operations: or, ||, &&, not
Expand Down
2 changes: 1 addition & 1 deletion examples/euler/euler012.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let num_div x =
if x mod i = 0 then incr count
done;
count := !count * 2; (* every factor < max_test has a corresponding one > *)
if x mod max_test = 0 then decr count; (* dont double count root if x square *)
if x mod max_test = 0 then decr count; (* don't double count root if x square *)
!count

let rec loop i n =
Expand Down
4 changes: 2 additions & 2 deletions examples/pleac/strings.ml
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ val rest : string =
Expanding Variables in User Input

(* As far as I know there is no way to do this in OCaml due to
type-safety contraints built into the OCaml compiler -- it may be
type-safety constraints built into the OCaml compiler -- it may be
feasible with *much* juju, but don't expect to see this anytime
soon...

Expand Down Expand Up @@ -551,7 +551,7 @@ Escaping Characters
** interpreter or the compilers.
**
** The "#load" line is only needed if you are running this in the
** command interpretter.
** command interpreter.
**
** If you are using either of the ocaml compilers, you will need
** to remove the "#load" line and link in str.cmxa in the final
Expand Down
2 changes: 1 addition & 1 deletion howto/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ upstream opam repository curators may have made changes to the public
opam files, to reflect new packaging best practices and policies. You
should check for any change to the latest version's `opam` file; if
there is any, it should probably be reproduced into our local `opam`
file, and commited.
file, and committed.

Note that the local file may have changed during the release lifetime
to reflect new dependencies or changes in packaging policies. These
Expand Down
2 changes: 1 addition & 1 deletion setup.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2653,7 +2653,7 @@ module OASISFindlib = struct
(fun lib_name status mp ->
match status with
| `Solved _ ->
(* Solved initialy, no need to go further *)
(* Solved initially, no need to go further *)
mp
| `Unsolved _ ->
let _, mp = solve SetString.empty mp lib_name "<none>" in
Expand Down
2 changes: 1 addition & 1 deletion src/batArray.mliv
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ val insert : 'a array -> 'a -> int -> 'a array

val print : ?first:string -> ?last:string -> ?sep:string ->
('a, 'b) BatIO.printer -> ('a t, 'b) BatIO.printer
(** Print the contents of an array, with [~first] preceeding the first
(** Print the contents of an array, with [~first] preceding the first
item (default: "\[|"), [~last] following the last item (default:
"|\]") and [~sep] separating items (default: "; "). A printing
function must be provided to print the items in the array.
Expand Down
2 changes: 1 addition & 1 deletion src/batConcreteQueue_403.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let filter_inplace f queue =
loop (length + 1) cons next
in
let first = find_next queue.first in
(* returning a pair is unecessary, the writes could be made at the
(* returning a pair is unnecessary, the writes could be made at the
end of 'loop', but the present style makes it obvious that all
three writes are performed atomically, without allocation,
function call or return (yield points) in between, guaranteeing
Expand Down
4 changes: 2 additions & 2 deletions src/batEnum.mli
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
As most data structures in Batteries can be enumerated and built
from enumerations, these operations may be used also on lists,
arrays, hashtables, etc. When designing a new data structure, it
is usuallly a good idea to allow enumeration and construction
is usually a good idea to allow enumeration and construction
from an enumeration.

{b Note} Enumerations are not thread-safe. You should not attempt
Expand Down Expand Up @@ -792,7 +792,7 @@ val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
*)

val ord : ('a -> 'a -> BatOrd.order) -> 'a t -> 'a t -> BatOrd.order
(** Same as [compare] but returning a {!BatOrd.order} instead of an interger. *)
(** Same as [compare] but returning a {!BatOrd.order} instead of an integer. *)

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
(** [equal eq a b] returns [true] when [a] and [b] contain
Expand Down
4 changes: 2 additions & 2 deletions src/batFingerTree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct
* It is slightly faster when benchmarking construction/deconstruction
* even with dummy annotations.

* In many places, it looks like functions are defined twice in slighly
* In many places, it looks like functions are defined twice in slightly
* different versions. This is for performance reasons, to avoid higher
* order calls (made everything 30% slower on my tests).
*)
Expand Down Expand Up @@ -735,7 +735,7 @@ struct
(* lookup *)
(*---------------------------------*)
(* This is a simplification of splitTree that avoids rebuilding the tree
* two trees aroud the elements being looked up
* two trees around the elements being looked up
* But you can't just find the element, so instead these functions find the
* element _and_ the measure of the elements of the current node that are on
* the left of the element.
Expand Down
6 changes: 3 additions & 3 deletions src/batFingerTree.mli
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
the measurement function (this is needed because sometimes
the type of the measure depends on the type of the elements).

This module also contains an instanciation of a finger tree that
This module also contains an instantiation of a finger tree that
implements a functional sequence with the following characteristics:
- amortized constant time addition and deletions at both ends
- contant time size operation
- constant time size operation
- logarithmic lookup, update or deletion of the element at a given index
- logarithmic splitting and concatenation

Expand Down Expand Up @@ -365,7 +365,7 @@ module Generic : sig
val split : (('m -> bool) -> ('a, 'm) fg -> ('a, 'm) fg * ('a, 'm) fg, 'a, 'm) wrap
(**
[split p t], when [p] is monotonic, returns [(t1, t2)] where
[t1] is the longest prefix of [t] whose measure does not satifies
[t1] is the longest prefix of [t] whose measure does not satisfies
[p], and [t2] is the rest of [t].
@raise Empty is there is no such element

Expand Down
4 changes: 2 additions & 2 deletions src/batFloat.mli
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ val succ : float -> float
equal to [x], due to rounding.*)

val pred : float -> float
(** Substract [1.] from a floating number. Note that, as per
(** Subtract [1.] from a floating number. Note that, as per
IEEE 754, if [x] is a large enough float number, [pred x]
might be equal to [x], due to rounding.*)

Expand Down Expand Up @@ -407,7 +407,7 @@ sig
equal to [x], due to rounding.*)

val pred : float -> float
(** Substract [1.] from a floating number. Note that, as per
(** Subtract [1.] from a floating number. Note that, as per
IEEE 754, if [x] is a large enough float number, [pred x]
might be equal to [x], due to rounding.*)

Expand Down
2 changes: 1 addition & 1 deletion src/batGc.mliv
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ type control = Gc.control =
mutable space_overhead : int;
(** The major GC speed is computed from this parameter.
This is the memory that will be "wasted" because the GC does not
immediatly collect unreachable blocks. It is expressed as a
immediately collect unreachable blocks. It is expressed as a
percentage of the memory used for live data.
The GC will work more (use more CPU time and collect
blocks more eagerly) if [space_overhead] is smaller.
Expand Down
2 changes: 1 addition & 1 deletion src/batHashtbl.mli
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
open Hashtbl

type ('a, 'b) t = ('a, 'b) Hashtbl.t
(** A Hashtable wth keys of type 'a and values 'b *)
(** A Hashtable with keys of type 'a and values 'b *)

(**{6 Base operations}*)

Expand Down
18 changes: 9 additions & 9 deletions src/batIO.mli
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ val read_all : input -> string
(** read all the contents of the input until [No_more_input] is raised. *)

val pipe : unit -> input * unit output
(** Create a pipe between an input and an ouput. Data written from
(** Create a pipe between an input and an output. Data written from
the output can be read from the input.
*)

Expand All @@ -381,15 +381,15 @@ val pos_in : input -> input * (unit -> int)

val progress_in : input -> (unit -> unit) -> input
(** [progress_in inp f] create an input that calls [f ()]
whenever some content is succesfully read from it.*)
whenever some content is successfully read from it.*)

val pos_out : 'a output -> unit output * (unit -> int)
(** Create an output that provide a count function of the number of bytes
written through it. *)

val progress_out : 'a output -> (unit -> unit) -> unit output
(** [progress_out out f] create an output that calls [f ()]
whenever some content is succesfully written to it.*)
whenever some content is successfully written to it.*)

external cast_output : 'a output -> unit output = "%identity"
(** You can safely transform any output to an unit output in a safe way
Expand Down Expand Up @@ -771,7 +771,7 @@ val to_input_channel : input -> in_channel
(** {6 Generic BatIO Object Wrappers}

These OO Wrappers have been written to provide easy support of
BatIO by external librairies. If you want your library to support
BatIO by external libraries. If you want your library to support
BatIO without actually requiring Batteries to compile, you can
implement the classes [in_channel], [out_channel],
[poly_in_channel] and/or [poly_out_channel] which are the common
Expand Down Expand Up @@ -880,7 +880,7 @@ val synchronize_in : ?lock:BatConcurrent.lock -> input -> input
wreak havoc otherwise

@param lock An optional lock. If none is provided, the lock will be specific
to this [input]. Specifiying a custom lock may be useful to associate one
to this [input]. Specifying a custom lock may be useful to associate one
common lock for several inputs and/or outputs, for instance in the case
of pipes.
*)
Expand All @@ -892,7 +892,7 @@ val synchronize_out: ?lock:BatConcurrent.lock -> _ output -> unit output
wreak havoc otherwise

@param lock An optional lock. If none is provided, the lock will be specific
to this [output]. Specifiying a custom lock may be useful to associate one
to this [output]. Specifying a custom lock may be useful to associate one
common lock for several inputs and/or outputs, for instance in the case
of pipes.
*)
Expand Down Expand Up @@ -952,7 +952,7 @@ module Incubator : sig
?sep:string ->
?indent:int ->
(Format.formatter -> 'a -> 'b) -> Format.formatter -> 'a array -> unit
(** Print the contents of an array, with [first] preceeding the first item
(** Print the contents of an array, with [first] preceding the first item
(default: ["\[|"]), [last] following the last item (default: ["|\]"])
and [sep] separating items (default: ["; "]). A printing function must
be provided to print the items in the array. The [flush] parameter
Expand All @@ -973,7 +973,7 @@ module Incubator : sig
?sep:string ->
?indent:int ->
(Format.formatter -> 'a -> 'b) -> Format.formatter -> 'a BatEnum.t -> unit
(** Print the contents of an enum, with [first] preceeding the first item
(** Print the contents of an enum, with [first] preceding the first item
(default: [""]), [last] following the last item (default: [""])
and [sep] separating items (default: [" "]). A printing function must
be provided to print the items in the enum. The [flush] parameter
Expand All @@ -993,7 +993,7 @@ module Incubator : sig
?sep:string ->
?indent:int ->
(Format.formatter -> 'a -> 'b) -> Format.formatter -> 'a list -> unit
(** Print the contents of a list, with [first] preceeding the first item
(** Print the contents of a list, with [first] preceding the first item
(default: ["\["]), [last] following the last item (default: ["\]"])
and [sep] separating items (default: ["; "]). A printing function must
be provided to print the items in the list. The [flush] parameter
Expand Down
2 changes: 1 addition & 1 deletion src/batInnerIO.mli
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ val read_all : input -> string
(** read all the contents of the input until [No_more_input] is raised. *)

val pipe : unit -> input * unit output
(** Create a pipe between an input and an ouput. Data written from
(** Create a pipe between an input and an output. Data written from
the output can be read from the input. *)

val nread : input -> int -> string
Expand Down
2 changes: 1 addition & 1 deletion src/batInnerWeaktbl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module Stack = struct
let len = length s in
if len >= s.length / 3 && len < s.length * 2 / 3 then push x s else
let len' = min (len * 3 / 2 + 2) (Sys.max_array_length -1) in
if len' = len then failwith "Weaktbl.Stack.push: stack cannnot grow"
if len' = len then failwith "Weaktbl.Stack.push: stack cannot grow"
else
let data' = Weak.create len' in
Weak.blit s.data 0 data' 0 s.cursor;
Expand Down
16 changes: 8 additions & 8 deletions src/batInt.mli
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ module Safe_int : sig
(** Addition. *)

val sub : t -> t -> t
(** Substraction. *)
(** Subtraction. *)

val ( - ) : t -> t -> t
(** Substraction. *)
(** Subtraction. *)

val mul : t -> t -> t
(** Multiplication. *)
Expand Down Expand Up @@ -307,23 +307,23 @@ module Safe_int : sig
(** [a ** b] computes a{^b}*)

val ( <> ) : t -> t -> bool
(** Comparaison: [a <> b] is true if and only if [a] and [b] have
(** Comparison: [a <> b] is true if and only if [a] and [b] have
different values. *)

val ( > ) : t -> t -> bool
(** Comparaison: [a > b] is true if and only if [a] is strictly greater than [b].*)
(** Comparison: [a > b] is true if and only if [a] is strictly greater than [b].*)

val ( < ) : t -> t -> bool
(** Comparaison: [a < b] is true if and only if [a] is strictly smaller than [b].*)
(** Comparison: [a < b] is true if and only if [a] is strictly smaller than [b].*)

val ( >= ) : t -> t -> bool
(** Comparaison: [a >= b] is true if and only if [a] is greater or equal to [b].*)
(** Comparison: [a >= b] is true if and only if [a] is greater or equal to [b].*)

val ( <= ) : t -> t -> bool
(** Comparaison: [a <= b] is true if and only if [a] is smaller or equalto [b].*)
(** Comparison: [a <= b] is true if and only if [a] is smaller or equalto [b].*)

val ( = ) : t -> t -> bool
(** Comparaison: [a = b] if and only if [a] and [b] have the same value.*)
(** Comparison: [a = b] if and only if [a] and [b] have the same value.*)

val max_num : t
(** The greatest representable integer, which is either 2{^30}-1 or 2{^62}-1. *)
Expand Down
Loading