Commit Graph
275 Commits
Author SHA1 Message Date
Qqwy / Wiebe-Marten 3ed1a66432 Fixes tiny typo (missing article) (#10119) 2020-06-22 01:01:36 +02:00
José Valim b028ac88a8 Improve references around functions 2020-05-17 16:05:45 +02:00
José Valim 138c1bd9ed Fixes to ExUnit.Diff, closes #9926 2020-04-21 20:24:09 +02:00
José Valim c13b5822dd Fix metadata link 2020-03-01 10:40:55 +01:00
Eric Meadows-Jönsson 0f85b397da Add checking of patterns in body (#9828) 2020-02-20 16:46:06 +01:00
José Valim af4d6c3731 Revert "Support import Mod, only: :sigils (#9822)"
It will be moved to the current multi-letter sigils PR.

This reverts commit 26adc8db3d.
2020-02-19 10:42:48 +01:00
Wojtek Mach 26adc8db3d Support import Mod, only: :sigils (#9822) 2020-02-17 16:58:09 +01:00
José Valim d002f2fd10 Deprecate remaining supervisor API 2020-01-07 18:17:34 +01:00
Wojtek Mach 0c7d09c570 Document :file option on quote/2 (#9679) 2020-01-01 17:26:27 +01:00
Eksperimental 9d87fe434e Replace usage of "etc." (#9569) 2019-11-29 08:22:18 +01:00
José Valim 8e7befb108 Add parens to static remote nullary calls
test/erlang/module_test.erl have also been removed
as they have been ported elsewhere.
2019-11-08 17:59:08 +01:00
Eksperimental 6632d559d6 Improve module docs in Kernel and Kernel.SpecialForms (#9486)
[ci skip]
2019-11-03 23:42:33 +01:00
Eksperimental 04a3876e3f Remove comment arrows from Exception messages (#9485) 2019-11-03 23:10:14 +01:00
Eksperimental 97119f17ea Use double-quotes around sections to refer to them (#9409)
[ci skip]
2019-10-15 08:57:44 +02:00
Eksperimental 99747c564f quote/2: Sort option fields in documentation (#9408) 2019-10-14 23:10:59 +02:00
Brett Beatty 0f5585dab8 Update docs for Kernel.SpecialForms.case/2 (#9378) 2019-10-03 07:37:57 +02:00
Fernando Tapia Rico 3366cebc7d Minor improvements in the documentation for <<>>/1 (#9217)
[ci skip]
2019-07-12 17:11:29 +02:00
Jonatan Männchen 13b5e53efa Document AST metadata (#9140) 2019-06-14 19:49:16 +02:00
Andrea Leopardi ad4a11da74 Use parens in IO.puts/1 calls around the codebase (#9018)
There were instances of IO.puts/1 calls without parens throughout the
 whole codebase (in docs, code, tests). I removed most of them where it
made sense to do so, so that users will find documentation and other
things consistent with how the formatter behaves.
2019-05-06 10:30:42 +02:00
Tony Han e38cd472d9 Fix a syntax error in the docs for try/1 (#9017)
[ci skip]
2019-05-06 10:02:30 +02:00
Qqwy / Wiebe-Marten 6d5e49c120 Updates documentation of capture operator with reference to Function.capture/3 (#8964) 2019-04-18 20:33:50 +02:00
Eksperimental 84f9128825 Replace use of "item(s)" with "element(s)" in Enum module (#8885) 2019-03-12 23:24:22 +01:00
Gustavo Saiani 8c27da88c7 Fix typos in Kernel.SpecialForms (#8819) 2019-02-22 21:16:00 +01:00
Gustavo Saiani c1bc409cc7 Improve Kernel.SpecialForms docs (#8798) 2019-02-15 14:09:40 +01:00
Gustavo Saiani c59b341cf3 Fix typos in Kernel.SpecialForm docs (#8781)
[ci skip]
2019-02-08 12:23:21 +01:00
Eksperimental 99d919e0c8 Use "code point" instead of "codepoint" (#8774)
That's the term it is used in the Unicode standard.
2019-02-06 11:21:03 +01:00
Tobiasz Małecki bd3a67fd6e Improve Kernel.SpecialForms.quote/2 doc examples (#8771) 2019-02-06 09:57:16 +01:00
Gustavo Saiani 3eb370aeb6 Fix typos in Kernel.SpecialForm docs (#8756) 2019-02-01 14:58:15 +01:00
Gustavo Saiani 653bf090a1 Fix typos in Kernel.SpecialForms doc (#8731) 2019-01-29 14:03:31 +01:00
Fernando Tapia Rico 7ad213b289 Error on undefined variables in bitstring segments (#8598)
Binary/bitstring matching allows to dynamically define the
`size` of the binary in certain conditions:

  * if the `size` variable is defined prior to the pattern
    match:

        iex> size = 8
        iex> <<a::size(size), rest::binary>> = "hello"
        iex> a
        104

  * if the `size` variable is matched within the same
    binary/bitstring match, prior to its use:

        iex> <<name_size::size(8), name::binary-size(name_size), _rest::binary>> = <<5, "Frank the Walrus">>
        iex> name
        "Frank"

Other cases are considered illegal patterns, for example:

    {name_size, <<name::binary-size(name_size), _rest::binary>>} = {5, "Frank the Walrus"}

This commit raises a `CompileError: undefined variable ...` for such cases.
2019-01-05 17:46:33 +01:00
José Valim 5ce4b61991 Add :reduce to for comprehensions (#8531) 2018-12-21 12:51:28 +01:00
Eksperimental 28522ccb89 Use "etc." and not "etc" (#8379)
Command used to detect these typos:
$ ag -s "\betc[^.]"
2018-11-10 14:04:49 +01:00
Fernando Tapia Rico d955fcf518 Update AST documentation (#8337) 2018-10-25 10:26:05 +02:00
José Valim 37149511c3 Mention Macro.escape/1 in quote docs 2018-10-25 09:50:49 +02:00
Eksperimental 865064fbdd Properly format atoms when denoting options (#8318)
As initially suggested by @fertapric for a different PR here:
https://github.com/elixir-lang/elixir/pull/8313#discussion_r226974093
2018-10-22 21:27:38 +02:00
José Valim 955285e99d Reduce uses of note that 2018-10-10 09:44:01 +02:00
Eksperimental 7cab1564bf Use NOTE THAT (#8270) 2018-10-10 09:41:52 +02:00
José Valim a35609bbb9 Improve docs for unquote, closes #8249 2018-10-03 13:38:33 +02:00
Eksperimental d612f20c7d Improvements in the documentation (#8189)
Grammar corrections, use of backticks and other improvements.
2018-09-14 12:16:39 +02:00
José Valim 9a8df5326d Add a note about getting the current stacktrace 2018-09-07 10:04:57 -07:00
Wojtek Mach fbb41695d7 Mention variable size in bitstring docs (#8169) 2018-09-06 10:53:58 -07:00
Schnittchen ea76fe8224 Docs: change wording about WithClauseError (#8122)
This way I hope people will not fall into the trap that no else has different error semantics, as mentioned above in the docs.
2018-08-22 23:30:14 +02:00
Luke Imhoff b37220ccfa Fix typos in literals (strings/charlists) (#8057)
* misisng -> missing

* Fix typo in callback reference

* curently -> currently

* overriden -> overridden

* intested on -> interested in

* unecessary -> unnecessary

* resued -> reused

I don't think lawyers are involved with compiling.

* Additonally -> Additionally

* preferrable -> preferable

* chuncks -> chunks

* non-sensical -> nonsensical

* mutiple -> multiple
2018-08-06 07:56:02 +02:00
Eksperimental ba6cfea701 Change arg names in example in receive/1 (#7863)
1. avoid use of single-char variables with not descriptive names ("i")
2. "value" can be thought of a number, so to make it clearer I replace it with "name"
2018-07-11 09:51:53 +02:00
Eksperimental d5e244611c Be precise in documentation about after values in Kernel.SpecialForms.receive/1 (#7856)
* 4_294_967_295 is still a valid number
* it is not correct to say that :infinity is the same as not using a timeout value,
  as this is needed if used the after clause. To what's equivalent is as to not to
  use the after clause itself.
* use the formal name "hexadecimal notation" in favor of "hex notation"

[ci skip]
2018-07-11 09:47:58 +02:00
José Valim beb596d37c Warn on unnecessary quotes (#7838) 2018-07-10 10:27:02 +02:00
José Valim c1d6bd3e60 Add a section about pattern matching on struct names 2018-07-02 15:09:51 +02:00
José Valim 75541cf472 Condititionally compile and lazily compute __STACKTRACE__ (#7648)
Erlang/OTP 20 warns if the stacktrace is read outside of a
catch/rescue. This commit mirrors this behaviour by consistently
warning on `System.stacktrace/0` being used outside of a
catch/rescue.

Erlang/OTP 21 warns whenever System.stacktrace/:erlang.get_stacktrace
are used. Therefore we need to promote the usage of `__STACKTRACE__`
and make sure to conditionally compile it according to the OTP version.
This requires changes to the Exception normalization mechanism
so we compute `__STACKTRACE__` only when strictly required.

In future Elixir releases, `System.stacktrace/0` will warn when
used even inside catch/rescue.
2018-05-07 15:33:36 +02:00
Gaoxiang Yang 7a829c5735 Fix a typo in the docs for quote (#7483) 2018-03-24 00:02:16 +01:00
José Valim d0378be1e7 Improve docs for with special form 2018-03-22 01:08:59 +01:00