Permalink
Browse files

[fix] typo: occurence->occurrence, occured->occurred

  • Loading branch information...
1 parent e83d1d9 commit 978b7c43316fa34fc048ac7689f30eb314ffb02e @akoprow akoprow committed Jul 8, 2011
@@ -823,7 +823,7 @@ struct
v
with
| e ->
- error "%a@\n@[<2> An error occured while trying to read package %s: %s.@]"
+ error "%a@\n@[<2> An error occurred while trying to read package %s: %s.@]"
FilePos.pp_pos pos
package_name
(Printexc.to_string e)
@@ -869,7 +869,7 @@ struct
assert(fst !current_package <> ""); (* asserting that the current package has been initialized *)
let file = dirname_from_package !current_package in
if not (File.check_create_path file) then
- OManager.error "An error occured while trying to create the object file %s." file;
+ OManager.error "An error occurred while trying to create the object file %s." file;
let filename = filename_from_package !current_package S.pass in
assert (not (File.exists filename)); (* this would break only if the compiler doesn't clean an existing
* object file before compiling it or if someone tries to
@@ -882,14 +882,14 @@ struct
close_out channel ;
()
with e ->
- OManager.error "An error occured while outputting to the object file %s: %s" file (Printexc.to_string e)
+ OManager.error "An error occurred while outputting to the object file %s: %s" file (Printexc.to_string e)
let show package =
try
let v = load1_exn package in
Format.printf "@[<2>%s:@\n%a@]@\n" S.pass S.pp v
with No_exit _s ->
- Format.printf "@[<2>%s:@\nAn error occured@]@\n" S.pass
+ Format.printf "@[<2>%s:@\nAn error occurred@]@\n" S.pass
let () = show_list := show :: !show_list
end
@@ -570,7 +570,7 @@ type t = {
let merge_search_results ll =
let n = List.length ll in
let occur = Hashtbl.create 23 in
- (* table from key to number of occurences. When that number equals n, we got a result *)
+ (* table from key to number of occurrences. When that number equals n, we got a result *)
let results = ref [] in
let add key =
let nb_occur = try Hashtbl.find occur key + 1 with Not_found -> 1 in
@@ -537,7 +537,7 @@ module DT = DbTypes
disk_writing session (Revision.make 0)
with DiskError s -> (
Logger.error "disk writing error : %s" s;
- (* an error occured during disk writing for the first revision.
+ (* an error occurred during disk writing for the first revision.
doesn't seems good for the further writings.
so the db is being closed.
*)
@@ -189,9 +189,9 @@ type unwind_mode =
which are at a given revision and so ignore queries until
you escape the copy via a link (back into the fully general problem).
- Invariant: queries say nothing about a path between the first occurence
+ Invariant: queries say nothing about a path between the first occurrence
of copy in the unwound version of the path and the first subsequent
- occurence of link (because any db operation changing anything inside
+ occurrence of link (because any db operation changing anything inside
a copy has to rewrite and replace the copy node together with the whole
path, until a link jumps out of the old revision).
*)
@@ -1868,7 +1868,7 @@ Expression has type [red]##{ f: !for all 'a . 'a -> 'a; g: int -> int }## but is
coerced into [red]##{ f: int -> int; g: int -> int }##.
Types [red]##!for all 'a . 'a -> 'a## and [red]##int -> int## are not compatible
Hint:
- Error occured through field [red]##f##.__
+ Error occurred through field [red]##f##.__
// Ok.
_ = {{ f(x:int) = x ; g(x) = x + 1 }} : {{ f : int -> int ; g : int -> int }}
@@ -1880,7 +1880,7 @@ _ = M : {{ f : int -> int ; g : int -> int }}
Expression has type [red]##Mty## but is coerced into [red]##{ f: int -> int; g: int -> int }##.
Types [red]##int -> int## and [red]##!for all 'a . 'a -> 'a## are not compatible
Hint:
- Error occured through field [red]##f##.__
+ Error occurred through field [red]##f##.__
// Ok.
_ = {{ f = M.f : int -> int ; g = M.g }} : {{ f : int -> int ; g : int -> int }}
@@ -1951,7 +1951,7 @@ Function was found of type
expects it to be of type [red]##Mty -> 'b##.
Types [red]##int -> 'a## and [red]##!for all 'c . 'c -> 'c## are not compatible
Hint:
- Error occured through field [red]##f##.__
+ Error occurred through field [red]##f##.__
// Ok because M.f is instantiated.
_ = f({ f = M.f })
View
@@ -68,7 +68,7 @@ val sort : (key * spec * doc) list -> (key * spec * doc) list
(** sort the options by alphabetical order on the key.
if a key appear more than once in the spec list,
only the first occurrence is keeped, while any other
- occurence is simply removed (no error) *)
+ occurrence is simply removed (no error) *)
val spec_of_assoc : 'a ref -> (string * 'a) list -> spec
val spec_opt_of_assoc : 'a option ref -> (string * 'a) list -> spec
@@ -165,7 +165,7 @@ val remove_first : 'a -> 'a list -> 'a list
val remove_first_or_fail_eq :
eq: ('a -> 'a -> bool) -> 'a -> 'a list -> 'a list
val remove_last : 'a list -> 'a list
-(** [replace elt rep lst] replaces all occurences of [elt] by given list [rep]. If [elt] does not occur in [lst], returns [lst]. *)
+(** [replace elt rep lst] replaces all occurrences of [elt] by given list [rep]. If [elt] does not occur in [lst], returns [lst]. *)
val replace : 'a -> 'a list -> 'a list -> 'a list
val cons : 'a -> 'a list -> 'a list
@@ -182,15 +182,15 @@ val get_only_element: 'a list -> 'a
(**
Remove duplicates from a sorted list.
- The first occurence is keeped, and the returned
+ The first occurrence is keeped, and the returned
list is still sorted.
*)
val uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list
(**
Remove duplicates from a unsorted list.
The returned list is not sorted, but does
- contains only the first occurence of each element.
+ contains only the first occurrence of each element.
*)
val uniq_unsorted : ?cmp:('a -> 'a -> int) -> ?conflict:('a -> 'a -> unit) -> 'a list -> 'a list
@@ -90,7 +90,7 @@ val map : (char -> char) -> string -> string
(* val rev_map *)
(**
- [multi_replace s (pat * repl) list] replace in [s] all occurences of
+ [multi_replace s (pat * repl) list] replace in [s] all occurrences of
each [pat] by its corresponding [repl]. Returns an error if a [pat]
is exactly the beginning of another one (e.g: 'to' and 'toto'). If a
pattern is included elseway in another way, the longer will be applyed
@@ -102,7 +102,7 @@ val map : (char -> char) -> string -> string
val multi_replace : string -> (string * string) list -> string
(**
- [replace s pat repl] replace in [s] all occurence of [pat] by [repl].
+ [replace s pat repl] replace in [s] all occurrence of [pat] by [repl].
Implemented using multi_replace. Returns a fresh string.
*)
val replace : string -> string -> string -> string
@@ -414,7 +414,7 @@ val rev_char_list_of_string : string -> char list
(** {6 Splitting} *)
(**
- cuts a string at the occurences of the given character. The separation
+ cuts a string at the occurrences of the given character. The separation
character is removed. Empty strings are'nt returned (that is,
[slice '/' "/path//x/"] returns [["path";"x"]]). Non tail-recursive.
*)
@@ -427,13 +427,13 @@ val slice : char -> string -> string list
val slice_chars : string -> string -> string list
(**
- split a string in two substrings, at the first occurence of [char], which is removed.
+ split a string in two substrings, at the first occurrence of [char], which is removed.
If [char] doesn't appear in [string], returns [(string,"")]
*)
val split_char : char -> string -> string * string
(**
- split a string in two substrings, at the last occurence of [char], which is removed.
+ split a string in two substrings, at the last occurrence of [char], which is removed.
If [char] doesn't appear in [string], returns [(string,"")]
*)
val split_char_last : char -> string -> string * string
@@ -206,7 +206,7 @@ module type S = sig
This cause a runtime error if the field is not present. *)
val unsafe_dot : ty_record -> field -> 'a
- (** In sum types, sometimes you just want to check the occurence of a field, without
+ (** In sum types, sometimes you just want to check the occurrence of a field, without
accessing its data *)
val is_present : ty_record -> field -> bool
View
@@ -107,7 +107,7 @@ val content : string -> string
val content_opt : string -> string option
(**
@param f the filename to read
- @return [None] if an error occured, [Some] of the content instead
+ @return [None] if an error occurred, [Some] of the content instead
*)
val mimetype : ?magic_file:string -> string -> string
@@ -312,7 +312,7 @@ val channel_contents : in_channel -> string
exception Process_error of string
val process_output : string -> string
val simplify_path : string -> string
- (* return completed paths for filename fname for each occurence in dirs *)
+ (* return completed paths for filename fname for each occurrence in dirs *)
val get_locations_regexp : ?dir:bool -> string list (*dirs*) -> string (*filename:caml regexp*) -> string list (* fnames *)
val get_locations : ?dir:bool -> string list (*dirs*) -> string (*fname*) -> string list (* fnames *)
View
@@ -43,8 +43,8 @@ exception Result of int StringMap.t (* internal use, to return result at eof *)
Optimized regexp: *)
let common_words = Str.regexp "\\(a\\(bout\\|ll\\|n[dy]\\|re\\|[mnst]\\)\\|b\\(ut\\|[ey]\\)\\|can\\|do\\(n't\\)?\\|edu\\|f\\(or\\|rom\\)\\|get\\|h\\(a\\(s\\|ve\\)\\|e\\)\\|i[fnst]\\|just\\|like\\|m\\(ore\\|[ey]\\)\\|not?\\|o\\(ne\\|ther\\|ut\\|[fnr]\\)\\|so\\(me\\)?\\|t\\(h\\(at\\|e\\(re\\|y\\)?\\|is\\)\\|o\\)\\|up\\|w\\(as\\|e\\|h\\(at\\|ich\\|o\\)\\|i\\(ll\\|th\\)\\|ould\\)\\|your?\\)$"
-(** @param map is a map from word to number of its occurences; this function
- returns the updated map with occurences from s *)
+(** @param map is a map from word to number of its occurrences; this function
+ returns the updated map with occurrences from s *)
let utf8_string map s =
let bad_utf8 () =
(* Base.jlog ~level:3 "Invalid utf-8 in string, not indexing";*) map in
View
@@ -243,7 +243,7 @@ type 'a substitution = 'a TypeVarMap.t
val empty_substitution : t substitution
(**
- Given a [substitution] between [typevar] and [t], replace every occurence
+ Given a [substitution] between [typevar] and [t], replace every occurrence
of [TypeVar i] by [substitute(i)].
The maping is the identity if [i] is [Not_found]
@@ -94,12 +94,12 @@ val map_exprident : QmlAst.code -> ( Ident.t -> Ident.t ) -> QmlAst.code
val get_deeper_expr : ?except:(QmlAst.expr-> bool) -> QmlAst.expr -> QmlAst.expr
(**
substitute old_expr new_expr global_expr
- =>replace in global_expr every occurence of old_expr (based on the annotation number) with new_expr
+ =>replace in global_expr every occurrence of old_expr (based on the annotation number) with new_expr
*)
val substitute : QmlAst.expr -> QmlAst.expr -> QmlAst.expr -> QmlAst.expr
(**
collect sub_expr global_expr
- =>collect all occurence of sub_expr (based on the annotation number)
+ =>collect all occurrence of sub_expr (based on the annotation number)
*)
val collect : QmlAst.expr -> QmlAst.expr -> QmlAst.expr list
(**
@@ -186,7 +186,7 @@ sig
val change_ident : QmlAst.ident -> QmlAst.expr -> QmlAst.expr
(**
- substitute all occurences of an ident by another expression
+ substitute all occurrences of an ident by another expression
dont care about annotmap and annot unicity, you are warned
can embbed side effet in the ident substitution map,
to count substitution for instance
@@ -145,7 +145,7 @@ module ExprPatt : sig
val fold : ('a -> QmlAst.expr -> 'a) -> ('a -> QmlAst.pat -> 'a) -> 'a -> QmlAst.expr -> 'a
end
-(** a test of occurence of anything depending on db in an expr *)
+(** a test of occurrence of anything depending on db in an expr *)
module UseDb :
sig
val expr : QmlAst.expr -> bool
@@ -55,7 +55,7 @@ let loc_set_add = LocSet.add
let loc_set_union = LocSet.union
type error_loc =
- (* the main location, of the subexpression being typed when error occured *)
+ (* the main location, of the subexpression being typed when error occurred *)
location *
(* any extra related locations, e.g., an application in another let rec
branch, which makes the currently typed application incorrect *)
@@ -344,7 +344,7 @@ and __prepare_print_scheme_parameters
Types { A ; ~a } and { B ; ~b } are incompatible.
Bla bla { <~a> } and { < ~b> } bla bla bla.
"
- that occured before because while printing the first message, abbreviations
+ that occurred before because while printing the first message, abbreviations
were created for the types, and then when printing the second message, the
printing routine directly found these abbreviations hence used them to
represent the types instead of showing again their structure.
@@ -289,7 +289,7 @@ let simple_type_to_qml_type initial_ty =
W_CoreTypes.cleanup_simple_type initial_ty ;
exported_ty
with killed_by ->
- (* In any case, even if an error occured, don't forget to cleanuo the type
+ (* In any case, even if an error occurred, don't forget to cleanuo the type
otherwise printing routines will encounter unexpected remaining
markers. *)
W_CoreTypes.cleanup_simple_type initial_ty ;
@@ -219,7 +219,7 @@ let pp_unification_conflict_detail ppf detail =
if not something_printed then Format.fprintf ppf "@\n" ;
(* Now print the name of the faulty field. *)
Format.fprintf ppf
- ("@[<2>@{<bright>Hint@}:@\nError@ occured@ through@ field@ " ^^
+ ("@[<2>@{<bright>Hint@}:@\nError@ occurred@ through@ field@ " ^^
"@{<red>%s@}.@]@\n")
field_name)
@@ -395,7 +395,7 @@ let generalize ~forbid_non_gen_vars ty =
W_CoreTypes.cleanup_simple_type ty ;
sch
with killed_by ->
- (* In any case, even if an error occured, don't forget to cleanuo the type
+ (* In any case, even if an error occurred, don't forget to cleanuo the type
otherwise printing routines will encounter unexpected remaining
markers. *)
W_CoreTypes.cleanup_simple_type ty ;
View
@@ -520,7 +520,7 @@ module Factorize :
sig
open IL
- (** letcont : factorize all occurence of the form
+ (** letcont : factorize all occurrence of the form
[LetCont (k, (x -> term), [ ApplyCont (k, y) ])]
rewriting it so :
[ <term> {x <- y} ]
@@ -603,7 +603,7 @@ struct
(* this can be factorized <term> { vident <- vident' } *)
(* Optimisation: once Vident are (vident, ExprIdent.t) UnionFind.t,
we can use : UnionFind.replace vident vident', but we need to be
- sure that [term] is the only one containing occurences of [vident] *)
+ sure that [term] is the only one containing occurrences of [vident] *)
let _ = #<If:CPS_VERBOSE $minlevel 1> Chrono.start _chrono_subst #<End> in
let term = Substitution.ident vident vident' term in
@@ -63,7 +63,7 @@ val default_options : continuation_options
val make_cont: continuation_options -> QmlClosureRuntime.t -> 'a continuation
val make_cont_ml: continuation_options -> ('a -> unit) -> 'a continuation
-(** a short name because of the number of occurences in the generated code *)
+(** a short name because of the number of occurrences in the generated code *)
val cont: QmlClosureRuntime.t -> 'a continuation
val cont_ml: ('a -> unit) -> 'a continuation
@@ -210,7 +210,7 @@ val release_barrier : 'a future -> 'a -> unit
Check if a barrier has been released.
Used for rewritting the top-level.
The function returns [true] if the barrier is computed,
- or if an exception occured during the computation of the barrier.
+ or if an exception occurred during the computation of the barrier.
*)
val is_released : _ future -> bool
@@ -34,7 +34,7 @@ type occur_kind =
| Multiple(* of bool*) (* multiple occurrences after possibly any binding
* [true] means that the binding is used as an expression *)
(* BEWARE:
- * (a=1)+a counts as two occurences of a
+ * (a=1)+a counts as two occurrences of a
* when (a=1, a) counts as one occurrence of a
* because (a=1)+a really means (a=1,a)+a
*)
@@ -28,7 +28,7 @@
definition.
We define a subset of QML ast to work only on the part of the ast which we are interested in.
- Then it replaces every occurence of the constant by the corresponding
+ Then it replaces every occurrence of the constant by the corresponding
toplevel identifier just defined.
Example :
@@ -100,7 +100,7 @@ let auto_disp_schema schema =
with
| e ->
OManager.warning ~wclass:WarningClass.dbgen_schema
- "@[<2> An error occured while trying to display the output the db schema@\n%s@]"
+ "@[<2> An error occurred while trying to display the output the db schema@\n%s@]"
(Printexc.to_string e)
else
if ObjectFiles.compilation_mode() = `init then (* Only export the full schema, ie after `init *)
@@ -30,7 +30,7 @@ val discard_remote_bypasses :
If they are really called at runtime, an exception will be thrown
- Precond:
- It assumes bypass hoisting has occured
+ It assumes bypass hoisting has occurred
- Goal:
It is intended for tests, because when the code is not sliced you end up with client bypasses

0 comments on commit 978b7c4

Please sign in to comment.