Skip to content

Commit eadbd8b

Browse files
Fix typos (#14023)
The typos were detected by this app: https://pypi.org/project/typos/ running the following command typos --exclude "lib/elixir/unicode/" --exclude "man/" --exclude "typos" --format brief
1 parent d97b29f commit eadbd8b

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

lib/elixir/lib/module/parallel_checker.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,8 @@ defmodule Module.ParallelChecker do
503503

504504
def handle_call({:lock, module}, from, %{waiting: waiting} = state) do
505505
case waiting do
506-
%{^module => froms} ->
507-
waiting = Map.put(state.waiting, module, [from | froms])
506+
%{^module => from_list} ->
507+
waiting = Map.put(state.waiting, module, [from | from_list])
508508
{:noreply, %{state | waiting: waiting}}
509509

510510
%{} ->
@@ -514,8 +514,8 @@ defmodule Module.ParallelChecker do
514514
end
515515

516516
def handle_call({:unlock, module}, _from, %{waiting: waiting} = state) do
517-
froms = Map.fetch!(waiting, module)
518-
Enum.each(froms, &:gen_server.reply(&1, false))
517+
from_list = Map.fetch!(waiting, module)
518+
Enum.each(from_list, &:gen_server.reply(&1, false))
519519
waiting = Map.delete(waiting, module)
520520
{:reply, :ok, %{state | waiting: waiting}}
521521
end

lib/elixir/lib/module/types/descr.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ defmodule Module.Types.Descr do
160160
def gradual?(descr), do: is_map_key(descr, :dynamic)
161161

162162
@doc """
163-
Returns true if hte type only has a gradual part.
163+
Returns true if the type only has a gradual part.
164164
"""
165165
def only_gradual?(%{dynamic: _} = descr), do: map_size(descr) == 1
166166
def only_gradual?(_), do: false

lib/elixir/pages/references/gradual-set-theoretic-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Elixir is in the process of incorporating set-theoretic types into the compiler.
44

55
* **sound** - the inferred and assigned by the type system align with the behaviour of the program
66

7-
* **gradual** - Elixir's type system includes the `dynamic()` type, which can be used when the type of a varible or expression is checked at runtime. In the absense of `dynamic()`, Elixir's type system behaves as a static one
7+
* **gradual** - Elixir's type system includes the `dynamic()` type, which can be used when the type of a variable or expression is checked at runtime. In the absence of `dynamic()`, Elixir's type system behaves as a static one
88

99
* **developer friendly** - the types are described, implemented, and composed using basic set operations: unions, intersections, and negation (hence it is a set-theoretic type system)
1010

@@ -104,7 +104,7 @@ Once Elixir introduces typed function signatures (see "Roadmap"), any function w
104104

105105
## Roadmap
106106

107-
The current milestone is to implement type inference of patterns and guards, as well as type checking of all language contructs, without changes to the Elixir language. At this stage, we want to collect feedback on the quality of error messages and performance, and therefore the type system has no user facing API. Full type inference of patterns was released in Elixir v1.18, and inference of guards is expected as part of Elixir v1.19.
107+
The current milestone is to implement type inference of patterns and guards, as well as type checking of all language constructs, without changes to the Elixir language. At this stage, we want to collect feedback on the quality of error messages and performance, and therefore the type system has no user facing API. Full type inference of patterns was released in Elixir v1.18, and inference of guards is expected as part of Elixir v1.19.
108108

109109
If the results are satisfactory, the next milestone will include a mechanism for defining typed structs. Elixir programs frequently pattern match on structs, which reveals information about the struct fields, but it knows nothing about their respective types. By propagating types from structs and their fields throughout the program, we will increase the type system’s ability to find errors while further straining our type system implementation. Proposals including the required changes to the language surface will be sent to the community once we reach this stage.
110110

lib/elixir/src/elixir_tokenizer.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ check_terminator({End, {EndLine, EndColumn, _}}, [{Start, {StartLine, StartColum
14491449
check_terminator({'end', {Line, Column, _}}, [], #elixir_tokenizer{mismatch_hints=Hints}) ->
14501450
Suffix =
14511451
case lists:keyfind('end', 1, Hints) of
1452-
{'end', HintLine, _Identation} ->
1452+
{'end', HintLine, _Indentation} ->
14531453
io_lib:format("\n~ts the \"end\" on line ~B may not have a matching \"do\" "
14541454
"defined before it (based on indentation)", [elixir_errors:prefix(hint), HintLine]);
14551455
false ->

lib/elixir/test/elixir/code_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ defmodule CodeTest do
9595
sample = """
9696
defmodule CodeTest.UnknownRemoteCall do
9797
def perform do
98-
UnkownModule.foo()
98+
UnknownModule.foo()
9999
end
100100
end
101101
"""
102102

103-
assert {_, [%{position: {3, 18}}]} =
103+
assert {_, [%{position: {3, 19}}]} =
104104
Code.with_diagnostics(fn ->
105105
quoted = Code.string_to_quoted!(sample, columns: true)
106106
Code.eval_quoted(quoted, [])

lib/elixir/test/elixir/module/types/descr_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ defmodule Module.Types.DescrTest do
782782
|> tuple_delete_at(1)
783783
|> equal?(union(tuple([integer()]), dynamic(tuple([float()]))))
784784

785-
# Succesfully deleting at position `index` in a tuple means that the dynamic
785+
# Successfully deleting at position `index` in a tuple means that the dynamic
786786
# values that succeed are intersected with tuples of size at least `index`
787787
assert dynamic(tuple()) |> tuple_delete_at(0) == dynamic(tuple())
788788
assert dynamic(term()) |> tuple_delete_at(0) == dynamic(tuple())
@@ -848,7 +848,7 @@ defmodule Module.Types.DescrTest do
848848
)
849849
)
850850

851-
# If you succesfully intersect at position index in a type, then the dynamic values
851+
# If you successfully intersect at position index in a type, then the dynamic values
852852
# that succeed are intersected with tuples of size at least index
853853
assert dynamic(union(tuple(), integer()))
854854
|> tuple_insert_at(1, boolean())

lib/elixir/test/elixir/path_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ defmodule PathTest do
234234

235235
assert Path.relative_to_cwd(Path.dirname(File.cwd!()), force: true) == ".."
236236

237-
[slash | splitted_cwd] = Path.split(File.cwd!())
238-
relative_to_root = List.duplicate("..", length(splitted_cwd))
237+
[slash | split_cwd] = Path.split(File.cwd!())
238+
relative_to_root = List.duplicate("..", length(split_cwd))
239239

240240
assert Path.relative_to_cwd(slash) == slash
241241
assert Path.relative_to_cwd(slash, force: true) == Path.join(relative_to_root)

0 commit comments

Comments
 (0)