Skip to content

Commit f2ff2c8

Browse files
eksperimentaljosevalim
authored andcommitted
General corrections (#7870)
* Modules/types are mentioned in singular, not plural * General improvements in the documentation
1 parent c6ffbe9 commit f2ff2c8

File tree

14 files changed

+25
-25
lines changed

14 files changed

+25
-25
lines changed

lib/elixir/lib/agent.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ defmodule Agent do
7777
defined module to be put under a supervision tree. The generated
7878
`child_spec/1` can be customized with the following options:
7979
80-
* `:id` - the child specification id, defaults to the current module
80+
* `:id` - the child specification identifier, defaults to the current module
8181
* `:start` - how to start the child process (defaults to calling `__MODULE__.start_link/1`)
8282
* `:restart` - when the child should be restarted, defaults to `:permanent`
8383
* `:shutdown` - how to shut down the child

lib/elixir/lib/gen_server.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ defmodule GenServer do
120120
defined module to be put under a supervision tree. The generated
121121
`child_spec/1` can be customized with the following options:
122122
123-
* `:id` - the child specification id, defaults to the current module
123+
* `:id` - the child specification identifier, defaults to the current module
124124
* `:start` - how to start the child process (defaults to calling `__MODULE__.start_link/1`)
125125
* `:restart` - when the child should be restarted, defaults to `:permanent`
126126
* `:shutdown` - how to shut down the child
@@ -161,11 +161,11 @@ defmodule GenServer do
161161
GenServer.call(MyStack, :pop) #=> :hello
162162
163163
Once the server is started, the remaining functions in this module (`call/3`,
164-
`cast/2`, and friends) will also accept an atom, or any `:global` or `:via`
165-
tuples. In general, the following formats are supported:
164+
`cast/2`, and friends) will also accept an atom, or any `{:global, ...}` or
165+
`{:via, ...}` tuples. In general, the following formats are supported:
166166
167-
* a `pid`
168-
* an `atom` if the server is locally registered
167+
* a PID
168+
* an atom if the server is locally registered
169169
* `{atom, node}` if the server is locally registered at another node
170170
* `{:global, term}` if the server is globally registered
171171
* `{:via, module, name}` if the server is registered through an alternative
@@ -558,7 +558,7 @@ defmodule GenServer do
558558
exits. For such reasons, we usually recommend important clean-up rules to
559559
happen in separated processes either by use of monitoring or by links
560560
themselves. There is no cleanup needed when the `GenServer` controls a `port` (e.g.
561-
`:gen_tcp.socket`) or `t:File.io_device/0`, because these will be closed on
561+
`:gen_tcp.socket`) or `t:File.io_device/0`, because these will be closed on
562562
receiving a `GenServer`'s exit signal and do not need to be closed manually
563563
in `c:terminate/2`.
564564

lib/elixir/lib/io/ansi/docs.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defmodule IO.ANSI.Docs do
1414
* `:doc_code` - code blocks (cyan)
1515
* `:doc_headings` - h1, h2, h3, h4, h5, h6 headings (yellow)
1616
* `:doc_inline_code` - inline code (cyan)
17-
* `:doc_table_heading` - style for table headings
17+
* `:doc_table_heading` - the style for table headings
1818
* `:doc_title` - top level heading (reverse, yellow)
1919
* `:doc_underline` - underlined text (underline)
2020
* `:width` - the width to format the text (80)

lib/elixir/lib/kernel.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ defmodule Kernel do
5959
6060
There are two data types without an accompanying module:
6161
62-
* Bitstrings - a sequence of bits, created with `Kernel.SpecialForms.<<>>/1`.
62+
* Bitstring - a sequence of bits, created with `Kernel.SpecialForms.<<>>/1`.
6363
When the number of bits is divisible by 8, they are called binaries and can
6464
be manipulated with Erlang's `:binary` module
6565
* Reference - a unique value in the runtime system, created with `make_ref/0`
@@ -4969,7 +4969,7 @@ defmodule Kernel do
49694969
@doc ~S"""
49704970
Handles the sigil `~c` for charlists.
49714971
4972-
It returns a charlist as if it were a single quoted string, unescaping
4972+
It returns a charlist as if it was a single quoted string, unescaping
49734973
characters and replacing interpolations.
49744974
49754975
## Examples

lib/elixir/lib/task.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ defmodule Task do
9696
defined module to be put under a supervision tree. The generated
9797
`child_spec/1` can be customized with the following options:
9898
99-
* `:id` - the child specification id, defaults to the current module
99+
* `:id` - the child specification identifier, defaults to the current module
100100
* `:start` - how to start the child process (defaults to calling `__MODULE__.start_link/1`)
101101
* `:restart` - when the child should be restarted, defaults to `:temporary`
102102
* `:shutdown` - how to shut down the child

lib/elixir/pages/Compatibility and Deprecations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Elixir version | Support
1616

1717
Major Elixir releases may contain breaking changes and those will be explicitly outlined in the CHANGELOG. There are currently no plans for a major v2 release.
1818

19-
## Compatibility between Elixir non-major versions
19+
## Compatibility between non-major Elixir versions
2020

2121
Elixir minor and patch releases are backwards compatible: well-defined behaviours and documented APIs in a given version will continue working on future versions.
2222

lib/ex_unit/lib/ex_unit/doc_test.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ defmodule ExUnit.DocTest do
165165
This macro is used to generate ExUnit test cases for doctests.
166166
167167
Calling `doctest(Module)` will generate tests for all doctests found
168-
in the module `Module`
168+
in the `module`.
169169
170170
Options can also be given:
171171
@@ -187,7 +187,7 @@ defmodule ExUnit.DocTest do
187187
188188
This macro is auto-imported with every `ExUnit.Case`.
189189
"""
190-
defmacro doctest(mod, opts \\ []) do
190+
defmacro doctest(module, opts \\ []) do
191191
require =
192192
if is_atom(Macro.expand(mod, __CALLER__)) do
193193
quote do

lib/iex/lib/iex/helpers.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ defmodule IEx.Helpers do
10671067
end
10681068

10691069
@doc """
1070-
Evaluates the contents of the file at `path` as if it were directly typed into
1070+
Evaluates the contents of the file at `path` as if it was directly typed into
10711071
the shell.
10721072
10731073
`path` has to be a literal string. `path` is automatically expanded via

lib/logger/lib/logger.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ defmodule Logger do
280280
281281
* `:line` - the current line
282282
283-
* `:pid` - the current process ID
283+
* `:pid` - the current process identifier
284284
285285
* `:crash_reason` - a two-element tuple with the throw/error/exit reason
286286
as first argument and the stacktrace as second. A throw will always be

lib/logger/lib/logger/formatter.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ defmodule Logger.Formatter do
1515
1616
The valid parameters you can use are:
1717
18-
* `$time` - time the log message was sent
19-
* `$date` - date the log message was sent
18+
* `$time` - the time the log message was sent
19+
* `$date` - the date the log message was sent
2020
* `$message` - the log message
2121
* `$level` - the log level
2222
* `$node` - the node that prints the message

0 commit comments

Comments
 (0)