Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 978b7c43316fa34fc048ac7689f30eb314ffb02e 1 parent e83d1d9
Adam Koprowski akoprow authored
8 compilerlib/objectFiles.ml
@@ -823,7 +823,7 @@ struct
823 823 v
824 824 with
825 825 | e ->
826   - error "%a@\n@[<2> An error occured while trying to read package %s: %s.@]"
  826 + error "%a@\n@[<2> An error occurred while trying to read package %s: %s.@]"
827 827 FilePos.pp_pos pos
828 828 package_name
829 829 (Printexc.to_string e)
@@ -869,7 +869,7 @@ struct
869 869 assert(fst !current_package <> ""); (* asserting that the current package has been initialized *)
870 870 let file = dirname_from_package !current_package in
871 871 if not (File.check_create_path file) then
872   - OManager.error "An error occured while trying to create the object file %s." file;
  872 + OManager.error "An error occurred while trying to create the object file %s." file;
873 873 let filename = filename_from_package !current_package S.pass in
874 874 assert (not (File.exists filename)); (* this would break only if the compiler doesn't clean an existing
875 875 * object file before compiling it or if someone tries to
@@ -882,14 +882,14 @@ struct
882 882 close_out channel ;
883 883 ()
884 884 with e ->
885   - OManager.error "An error occured while outputting to the object file %s: %s" file (Printexc.to_string e)
  885 + OManager.error "An error occurred while outputting to the object file %s: %s" file (Printexc.to_string e)
886 886
887 887 let show package =
888 888 try
889 889 let v = load1_exn package in
890 890 Format.printf "@[<2>%s:@\n%a@]@\n" S.pass S.pp v
891 891 with No_exit _s ->
892   - Format.printf "@[<2>%s:@\nAn error occured@]@\n" S.pass
  892 + Format.printf "@[<2>%s:@\nAn error occurred@]@\n" S.pass
893 893
894 894 let () = show_list := show :: !show_list
895 895 end
2  database/db3/hldb.ml
@@ -570,7 +570,7 @@ type t = {
570 570 let merge_search_results ll =
571 571 let n = List.length ll in
572 572 let occur = Hashtbl.create 23 in
573   - (* table from key to number of occurences. When that number equals n, we got a result *)
  573 + (* table from key to number of occurrences. When that number equals n, we got a result *)
574 574 let results = ref [] in
575 575 let add key =
576 576 let nb_occur = try Hashtbl.find occur key + 1 with Not_found -> 1 in
2  database/db3/session.ml
@@ -537,7 +537,7 @@ module DT = DbTypes
537 537 disk_writing session (Revision.make 0)
538 538 with DiskError s -> (
539 539 Logger.error "disk writing error : %s" s;
540   - (* an error occured during disk writing for the first revision.
  540 + (* an error occurred during disk writing for the first revision.
541 541 doesn't seems good for the further writings.
542 542 so the db is being closed.
543 543 *)
4 database/db3/unwind.ml
@@ -189,9 +189,9 @@ type unwind_mode =
189 189 which are at a given revision and so ignore queries until
190 190 you escape the copy via a link (back into the fully general problem).
191 191
192   - Invariant: queries say nothing about a path between the first occurence
  192 + Invariant: queries say nothing about a path between the first occurrence
193 193 of copy in the unwound version of the path and the first subsequent
194   - occurence of link (because any db operation changing anything inside
  194 + occurrence of link (because any db operation changing anything inside
195 195 a copy has to rewrite and replace the copy node together with the whole
196 196 path, until a link jumps out of the old revision).
197 197 *)
6 doc/book/the_type_system/the_type_system.adoc
Source Rendered
@@ -1868,7 +1868,7 @@ Expression has type [red]##{ f: !for all 'a . 'a -> 'a; g: int -> int }## but is
1868 1868 coerced into [red]##{ f: int -> int; g: int -> int }##.
1869 1869 Types [red]##!for all 'a . 'a -> 'a## and [red]##int -> int## are not compatible
1870 1870 Hint:
1871   - Error occured through field [red]##f##.__
  1871 + Error occurred through field [red]##f##.__
1872 1872
1873 1873 // Ok.
1874 1874 _ = {{ 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 }}
1880 1880 Expression has type [red]##Mty## but is coerced into [red]##{ f: int -> int; g: int -> int }##.
1881 1881 Types [red]##int -> int## and [red]##!for all 'a . 'a -> 'a## are not compatible
1882 1882 Hint:
1883   - Error occured through field [red]##f##.__
  1883 + Error occurred through field [red]##f##.__
1884 1884
1885 1885 // Ok.
1886 1886 _ = {{ f = M.f : int -> int ; g = M.g }} : {{ f : int -> int ; g : int -> int }}
@@ -1951,7 +1951,7 @@ Function was found of type
1951 1951 expects it to be of type [red]##Mty -> 'b##.
1952 1952 Types [red]##int -> 'a## and [red]##!for all 'c . 'c -> 'c## are not compatible
1953 1953 Hint:
1954   - Error occured through field [red]##f##.__
  1954 + Error occurred through field [red]##f##.__
1955 1955
1956 1956 // Ok because M.f is instantiated.
1957 1957 _ = f({ f = M.f })
2  libbase/baseArg.mli
@@ -68,7 +68,7 @@ val sort : (key * spec * doc) list -> (key * spec * doc) list
68 68 (** sort the options by alphabetical order on the key.
69 69 if a key appear more than once in the spec list,
70 70 only the first occurrence is keeped, while any other
71   - occurence is simply removed (no error) *)
  71 + occurrence is simply removed (no error) *)
72 72
73 73 val spec_of_assoc : 'a ref -> (string * 'a) list -> spec
74 74 val spec_opt_of_assoc : 'a option ref -> (string * 'a) list -> spec
6 libbase/baseList.mli
@@ -165,7 +165,7 @@ val remove_first : 'a -> 'a list -> 'a list
165 165 val remove_first_or_fail_eq :
166 166 eq: ('a -> 'a -> bool) -> 'a -> 'a list -> 'a list
167 167 val remove_last : 'a list -> 'a list
168   -(** [replace elt rep lst] replaces all occurences of [elt] by given list [rep]. If [elt] does not occur in [lst], returns [lst]. *)
  168 +(** [replace elt rep lst] replaces all occurrences of [elt] by given list [rep]. If [elt] does not occur in [lst], returns [lst]. *)
169 169 val replace : 'a -> 'a list -> 'a list -> 'a list
170 170 val cons : 'a -> 'a list -> 'a list
171 171
@@ -182,7 +182,7 @@ val get_only_element: 'a list -> 'a
182 182
183 183 (**
184 184 Remove duplicates from a sorted list.
185   - The first occurence is keeped, and the returned
  185 + The first occurrence is keeped, and the returned
186 186 list is still sorted.
187 187 *)
188 188 val uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list
@@ -190,7 +190,7 @@ val uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list
190 190 (**
191 191 Remove duplicates from a unsorted list.
192 192 The returned list is not sorted, but does
193   - contains only the first occurence of each element.
  193 + contains only the first occurrence of each element.
194 194 *)
195 195 val uniq_unsorted : ?cmp:('a -> 'a -> int) -> ?conflict:('a -> 'a -> unit) -> 'a list -> 'a list
196 196
10 libbase/baseString.mli
@@ -90,7 +90,7 @@ val map : (char -> char) -> string -> string
90 90 (* val rev_map *)
91 91
92 92 (**
93   - [multi_replace s (pat * repl) list] replace in [s] all occurences of
  93 + [multi_replace s (pat * repl) list] replace in [s] all occurrences of
94 94 each [pat] by its corresponding [repl]. Returns an error if a [pat]
95 95 is exactly the beginning of another one (e.g: 'to' and 'toto'). If a
96 96 pattern is included elseway in another way, the longer will be applyed
@@ -102,7 +102,7 @@ val map : (char -> char) -> string -> string
102 102 val multi_replace : string -> (string * string) list -> string
103 103
104 104 (**
105   - [replace s pat repl] replace in [s] all occurence of [pat] by [repl].
  105 + [replace s pat repl] replace in [s] all occurrence of [pat] by [repl].
106 106 Implemented using multi_replace. Returns a fresh string.
107 107 *)
108 108 val replace : string -> string -> string -> string
@@ -414,7 +414,7 @@ val rev_char_list_of_string : string -> char list
414 414 (** {6 Splitting} *)
415 415
416 416 (**
417   - cuts a string at the occurences of the given character. The separation
  417 + cuts a string at the occurrences of the given character. The separation
418 418 character is removed. Empty strings are'nt returned (that is,
419 419 [slice '/' "/path//x/"] returns [["path";"x"]]). Non tail-recursive.
420 420 *)
@@ -427,13 +427,13 @@ val slice : char -> string -> string list
427 427 val slice_chars : string -> string -> string list
428 428
429 429 (**
430   - split a string in two substrings, at the first occurence of [char], which is removed.
  430 + split a string in two substrings, at the first occurrence of [char], which is removed.
431 431 If [char] doesn't appear in [string], returns [(string,"")]
432 432 *)
433 433 val split_char : char -> string -> string * string
434 434
435 435 (**
436   - split a string in two substrings, at the last occurence of [char], which is removed.
  436 + split a string in two substrings, at the last occurrence of [char], which is removed.
437 437 If [char] doesn't appear in [string], returns [(string,"")]
438 438 *)
439 439 val split_char_last : char -> string -> string * string
2  libbase/bslServerLib.ml
@@ -206,7 +206,7 @@ module type S = sig
206 206 This cause a runtime error if the field is not present. *)
207 207 val unsafe_dot : ty_record -> field -> 'a
208 208
209   - (** In sum types, sometimes you just want to check the occurence of a field, without
  209 + (** In sum types, sometimes you just want to check the occurrence of a field, without
210 210 accessing its data *)
211 211 val is_present : ty_record -> field -> bool
212 212
4 libbase/file.mli
@@ -107,7 +107,7 @@ val content : string -> string
107 107 val content_opt : string -> string option
108 108 (**
109 109 @param f the filename to read
110   - @return [None] if an error occured, [Some] of the content instead
  110 + @return [None] if an error occurred, [Some] of the content instead
111 111 *)
112 112
113 113 val mimetype : ?magic_file:string -> string -> string
@@ -312,7 +312,7 @@ val channel_contents : in_channel -> string
312 312 exception Process_error of string
313 313 val process_output : string -> string
314 314 val simplify_path : string -> string
315   - (* return completed paths for filename fname for each occurence in dirs *)
  315 + (* return completed paths for filename fname for each occurrence in dirs *)
316 316
317 317 val get_locations_regexp : ?dir:bool -> string list (*dirs*) -> string (*filename:caml regexp*) -> string list (* fnames *)
318 318 val get_locations : ?dir:bool -> string list (*dirs*) -> string (*fname*) -> string list (* fnames *)
4 libbase/indexer.ml
@@ -43,8 +43,8 @@ exception Result of int StringMap.t (* internal use, to return result at eof *)
43 43 Optimized regexp: *)
44 44 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?\\)$"
45 45
46   -(** @param map is a map from word to number of its occurences; this function
47   - returns the updated map with occurences from s *)
  46 +(** @param map is a map from word to number of its occurrences; this function
  47 + returns the updated map with occurrences from s *)
48 48 let utf8_string map s =
49 49 let bad_utf8 () =
50 50 (* Base.jlog ~level:3 "Invalid utf-8 in string, not indexing";*) map in
2  libbsl/bslTypes.mli
@@ -243,7 +243,7 @@ type 'a substitution = 'a TypeVarMap.t
243 243 val empty_substitution : t substitution
244 244
245 245 (**
246   - Given a [substitution] between [typevar] and [t], replace every occurence
  246 + Given a [substitution] between [typevar] and [t], replace every occurrence
247 247 of [TypeVar i] by [substitute(i)].
248 248
249 249 The maping is the identity if [i] is [Not_found]
6 libqmlcompil/qmlAstUtils.mli
@@ -94,12 +94,12 @@ val map_exprident : QmlAst.code -> ( Ident.t -> Ident.t ) -> QmlAst.code
94 94 val get_deeper_expr : ?except:(QmlAst.expr-> bool) -> QmlAst.expr -> QmlAst.expr
95 95 (**
96 96 substitute old_expr new_expr global_expr
97   - =>replace in global_expr every occurence of old_expr (based on the annotation number) with new_expr
  97 + =>replace in global_expr every occurrence of old_expr (based on the annotation number) with new_expr
98 98 *)
99 99 val substitute : QmlAst.expr -> QmlAst.expr -> QmlAst.expr -> QmlAst.expr
100 100 (**
101 101 collect sub_expr global_expr
102   - =>collect all occurence of sub_expr (based on the annotation number)
  102 + =>collect all occurrence of sub_expr (based on the annotation number)
103 103 *)
104 104 val collect : QmlAst.expr -> QmlAst.expr -> QmlAst.expr list
105 105 (**
@@ -186,7 +186,7 @@ sig
186 186 val change_ident : QmlAst.ident -> QmlAst.expr -> QmlAst.expr
187 187
188 188 (**
189   - substitute all occurences of an ident by another expression
  189 + substitute all occurrences of an ident by another expression
190 190 dont care about annotmap and annot unicity, you are warned
191 191 can embbed side effet in the ident substitution map,
192 192 to count substitution for instance
2  libqmlcompil/qmlAstWalk.mli
@@ -145,7 +145,7 @@ module ExprPatt : sig
145 145 val fold : ('a -> QmlAst.expr -> 'a) -> ('a -> QmlAst.pat -> 'a) -> 'a -> QmlAst.expr -> 'a
146 146 end
147 147
148   -(** a test of occurence of anything depending on db in an expr *)
  148 +(** a test of occurrence of anything depending on db in an expr *)
149 149 module UseDb :
150 150 sig
151 151 val expr : QmlAst.expr -> bool
2  libqmlcompil/qmlTyperException.ml
@@ -55,7 +55,7 @@ let loc_set_add = LocSet.add
55 55 let loc_set_union = LocSet.union
56 56
57 57 type error_loc =
58   - (* the main location, of the subexpression being typed when error occured *)
  58 + (* the main location, of the subexpression being typed when error occurred *)
59 59 location *
60 60 (* any extra related locations, e.g., an application in another let rec
61 61 branch, which makes the currently typed application incorrect *)
2  libqmlcompil/typer_w/w_PrintTypes.ml
@@ -344,7 +344,7 @@ and __prepare_print_scheme_parameters
344 344 Types { A ; ~a } and { B ; ~b } are incompatible.
345 345 Bla bla { <~a> } and { < ~b> } bla bla bla.
346 346 "
347   - that occured before because while printing the first message, abbreviations
  347 + that occurred before because while printing the first message, abbreviations
348 348 were created for the types, and then when printing the second message, the
349 349 printing routine directly found these abbreviations hence used them to
350 350 represent the types instead of showing again their structure.
2  libqmlcompil/typer_w/w_PublicExport.ml
@@ -289,7 +289,7 @@ let simple_type_to_qml_type initial_ty =
289 289 W_CoreTypes.cleanup_simple_type initial_ty ;
290 290 exported_ty
291 291 with killed_by ->
292   - (* In any case, even if an error occured, don't forget to cleanuo the type
  292 + (* In any case, even if an error occurred, don't forget to cleanuo the type
293 293 otherwise printing routines will encounter unexpected remaining
294 294 markers. *)
295 295 W_CoreTypes.cleanup_simple_type initial_ty ;
2  libqmlcompil/typer_w/w_ReportErrors.ml
@@ -219,7 +219,7 @@ let pp_unification_conflict_detail ppf detail =
219 219 if not something_printed then Format.fprintf ppf "@\n" ;
220 220 (* Now print the name of the faulty field. *)
221 221 Format.fprintf ppf
222   - ("@[<2>@{<bright>Hint@}:@\nError@ occured@ through@ field@ " ^^
  222 + ("@[<2>@{<bright>Hint@}:@\nError@ occurred@ through@ field@ " ^^
223 223 "@{<red>%s@}.@]@\n")
224 224 field_name)
225 225
2  libqmlcompil/typer_w/w_SchemeGenAndInst.ml
@@ -395,7 +395,7 @@ let generalize ~forbid_non_gen_vars ty =
395 395 W_CoreTypes.cleanup_simple_type ty ;
396 396 sch
397 397 with killed_by ->
398   - (* In any case, even if an error occured, don't forget to cleanuo the type
  398 + (* In any case, even if an error occurred, don't forget to cleanuo the type
399 399 otherwise printing routines will encounter unexpected remaining
400 400 markers. *)
401 401 W_CoreTypes.cleanup_simple_type ty ;
4 qmlcps/qmlCpsIL.ml
@@ -520,7 +520,7 @@ module Factorize :
520 520 sig
521 521 open IL
522 522
523   - (** letcont : factorize all occurence of the form
  523 + (** letcont : factorize all occurrence of the form
524 524 [LetCont (k, (x -> term), [ ApplyCont (k, y) ])]
525 525 rewriting it so :
526 526 [ <term> {x <- y} ]
@@ -603,7 +603,7 @@ struct
603 603 (* this can be factorized <term> { vident <- vident' } *)
604 604 (* Optimisation: once Vident are (vident, ExprIdent.t) UnionFind.t,
605 605 we can use : UnionFind.replace vident vident', but we need to be
606   - sure that [term] is the only one containing occurences of [vident] *)
  606 + sure that [term] is the only one containing occurrences of [vident] *)
607 607
608 608 let _ = #<If:CPS_VERBOSE $minlevel 1> Chrono.start _chrono_subst #<End> in
609 609 let term = Substitution.ident vident vident' term in
4 qmlcps/qmlCpsServerLib.mli
@@ -63,7 +63,7 @@ val default_options : continuation_options
63 63 val make_cont: continuation_options -> QmlClosureRuntime.t -> 'a continuation
64 64 val make_cont_ml: continuation_options -> ('a -> unit) -> 'a continuation
65 65
66   -(** a short name because of the number of occurences in the generated code *)
  66 +(** a short name because of the number of occurrences in the generated code *)
67 67 val cont: QmlClosureRuntime.t -> 'a continuation
68 68 val cont_ml: ('a -> unit) -> 'a continuation
69 69
@@ -210,7 +210,7 @@ val release_barrier : 'a future -> 'a -> unit
210 210 Check if a barrier has been released.
211 211 Used for rewritting the top-level.
212 212 The function returns [true] if the barrier is computed,
213   - or if an exception occured during the computation of the barrier.
  213 + or if an exception occurred during the computation of the barrier.
214 214 *)
215 215 val is_released : _ future -> bool
216 216
2  qmljsimp/imp_Inlining.ml
@@ -34,7 +34,7 @@ type occur_kind =
34 34 | Multiple(* of bool*) (* multiple occurrences after possibly any binding
35 35 * [true] means that the binding is used as an expression *)
36 36 (* BEWARE:
37   - * (a=1)+a counts as two occurences of a
  37 + * (a=1)+a counts as two occurrences of a
38 38 * when (a=1, a) counts as one occurrence of a
39 39 * because (a=1)+a really means (a=1,a)+a
40 40 *)
2  qmlpasses/pass_ConstantSharing.mli
@@ -28,7 +28,7 @@
28 28 definition.
29 29 We define a subset of QML ast to work only on the part of the ast which we are interested in.
30 30
31   - Then it replaces every occurence of the constant by the corresponding
  31 + Then it replaces every occurrence of the constant by the corresponding
32 32 toplevel identifier just defined.
33 33
34 34 Example :
2  qmlpasses/pass_DbSchemaGeneration.ml
@@ -100,7 +100,7 @@ let auto_disp_schema schema =
100 100 with
101 101 | e ->
102 102 OManager.warning ~wclass:WarningClass.dbgen_schema
103   - "@[<2> An error occured while trying to display the output the db schema@\n%s@]"
  103 + "@[<2> An error occurred while trying to display the output the db schema@\n%s@]"
104 104 (Printexc.to_string e)
105 105 else
106 106 if ObjectFiles.compilation_mode() = `init then (* Only export the full schema, ie after `init *)
2  qmlslicer/qmlFakeSlicer.mli
@@ -30,7 +30,7 @@ val discard_remote_bypasses :
30 30 If they are really called at runtime, an exception will be thrown
31 31
32 32 - Precond:
33   - It assumes bypass hoisting has occured
  33 + It assumes bypass hoisting has occurred
34 34
35 35 - Goal:
36 36 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.
Something went wrong with that request. Please try again.