File 0310-Fix-typos-in-lib-dialyzer.patch of Package erlang
From 064f9f74fc800470988c8b25944a09180d73b3db Mon Sep 17 00:00:00 2001
From: "Kian-Meng, Ang" <kianmeng@cpan.org>
Date: Fri, 10 Dec 2021 06:57:37 +0800
Subject: [PATCH] Fix typos in lib/dialyzer
---
lib/dialyzer/RELEASE_NOTES | 2 +-
lib/dialyzer/src/dialyzer_callgraph.erl | 6 +++---
lib/dialyzer/src/dialyzer_dot.erl | 8 ++++----
lib/dialyzer/src/erl_types.erl | 4 ++--
lib/dialyzer/src/typer.erl | 2 +-
lib/dialyzer/test/plt_SUITE.erl | 2 +-
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/lib/dialyzer/RELEASE_NOTES b/lib/dialyzer/RELEASE_NOTES
index 299cc8642f..909cada009 100644
--- a/lib/dialyzer/RELEASE_NOTES
+++ b/lib/dialyzer/RELEASE_NOTES
@@ -257,7 +257,7 @@ Version 1.5.1 (in Erlang/OTP R11B-3)
Version 1.5.0 (in Erlang/OTP R11B-2)
------------------------------------
- Dialyzer's building of PLT is based on a different type inference algorithm.
- More specifically, Dialyzer uses inferrence of refined success typings to
+ More specifically, Dialyzer uses inference of refined success typings to
infer function prototypes. As a result, Dialyzer bases its analysis on a
significantly more powerful basis and thus is able to detect more
discrepancies. The downside is that building the PLT is a considerably
diff --git a/lib/dialyzer/src/dialyzer_callgraph.erl b/lib/dialyzer/src/dialyzer_callgraph.erl
index 506a785885..4f53e99d6f 100644
--- a/lib/dialyzer/src/dialyzer_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_callgraph.erl
@@ -580,8 +580,8 @@ digraph_remove_external(DG) ->
Unconfirmed = remove_unconfirmed(Vertices, DG),
{DG, Unconfirmed}.
-remove_unconfirmed(Vertexes, DG) ->
- remove_unconfirmed(Vertexes, DG, []).
+remove_unconfirmed(Vertices, DG) ->
+ remove_unconfirmed(Vertices, DG, []).
remove_unconfirmed([V|Left], DG, Unconfirmed) ->
case digraph:vertex(DG, V) of
@@ -799,7 +799,7 @@ do_condensation(G, Parent) ->
IntScc = sofs:relation(IntToSCC, [{int, scc}]),
%% Create mapping from unique integers to SCCs:
ets:insert(MapsETS, IntToSCC),
- %% Subsitute strong components for vertices in edges using the
+ %% Substitute strong components for vertices in edges using the
%% unique numbers:
C2V = sofs:relation([{SC, V} || SC <- SCCs, V <- SC], [{scc, v}]),
I2V = sofs:relative_product(IntScc, C2V), % [{v, int}]
diff --git a/lib/dialyzer/src/dialyzer_dot.erl b/lib/dialyzer/src/dialyzer_dot.erl
index 210067a2ab..4caaf53f0c 100644
--- a/lib/dialyzer/src/dialyzer_dot.erl
+++ b/lib/dialyzer/src/dialyzer_dot.erl
@@ -41,7 +41,7 @@
%% filename is the name of the resulting .dot file the GraphName is
%% pretty much useless.
%%
-%% The resulting .dot reprsentation will be stored in the flie FileName.
+%% The resulting .dot representation will be stored in the file FileName.
%%
%% Interfaces:
%%
@@ -115,12 +115,12 @@ node_format(Opt, Fun, V) ->
Tmp = io_lib:format("~p", [Fun(V)]),
String = lists:flatten(Tmp),
%% io:format("~p", [String]),
- {Width, Heigth} = calc_dim(String),
+ {Width, Height} = calc_dim(String),
W = ((Width div 7) + 1) * 0.55,
- H = Heigth * 0.4,
+ H = Height * 0.4,
SL = io_lib:format("~f", [W]),
SH = io_lib:format("~f", [H]),
- [String, " [width=", SL, " heigth=", SH, " ", OptText,"];\n"].
+ [String, " [width=", SL, " height=", SH, " ", OptText,"];\n"].
edge_format(Opt, Fun, V1, V2) ->
OptText =
diff --git a/lib/dialyzer/src/erl_types.erl b/lib/dialyzer/src/erl_types.erl
index f82251d1f0..3b79e625a4 100644
--- a/lib/dialyzer/src/erl_types.erl
+++ b/lib/dialyzer/src/erl_types.erl
@@ -3598,7 +3598,7 @@ is_type_name(_Mod1, _Name1, _Arity1, _Mod2, _Name2, _Arity2) ->
%% assign_vars_lists(Elements1, Elements2, Dict);
%%assign_vars(?tuple_set(_) = T, ?tuple_set(List2), Dict) ->
%% %% All Rhs tuples must already be subtypes of Lhs, so we can take
-%% %% each one separatly.
+%% %% each one separately.
%% assign_vars_lists([T || _ <- List2], List2, Dict);
%%assign_vars(?tuple(?any, ?any, ?any), ?tuple_set(_), Dict) ->
%% Dict;
@@ -5061,7 +5061,7 @@ separate_key(?union(List)) ->
lists:append([separate_key(K) || K <- List, not t_is_none(K)]);
separate_key(Key) -> [Key].
-%% Sorts, combines non-singleton pairs, and applies precendence and
+%% Sorts, combines non-singleton pairs, and applies precedence and
%% mandatoriness rules.
map_from_form([], ShdwPs, MKs, Pairs, DefK, DefV) ->
verify_possible(MKs, ShdwPs),
diff --git a/lib/dialyzer/src/typer.erl b/lib/dialyzer/src/typer.erl
index 7f597f146e..8eb3453fe6 100644
--- a/lib/dialyzer/src/typer.erl
+++ b/lib/dialyzer/src/typer.erl
@@ -1047,7 +1047,7 @@ help_message() ->
-pa dir
-pz dir
Set code path options to TypEr
- (This is useful for files that use parse tranforms.)
+ (This is useful for files that use parse transforms.)
--version (or -v)
prints the Typer version and exits
--help (or -h)
diff --git a/lib/dialyzer/test/plt_SUITE.erl b/lib/dialyzer/test/plt_SUITE.erl
index 800f1fd307..c7bed8b866 100644
--- a/lib/dialyzer/test/plt_SUITE.erl
+++ b/lib/dialyzer/test/plt_SUITE.erl
@@ -213,7 +213,7 @@ local_fun_same_as_callback(Config) when is_list(Config) ->
-export([bad/0]).
- %% @doc This function incorreclty implements bad_behaviour.
+ %% @doc This function incorrectly implements bad_behaviour.
bad() -> not_bad.">>,
{ok, TestBeam} = compile(Config, Prog2, bad_child, []),
--
2.31.1