Commit Graph
8916 Commits
Author SHA1 Message Date
José Valim 82c4c3616b Deprecate Exception.exception?/1 and Regex.regex?/1 2020-08-17 09:54:13 +02:00
José Valim 2d6e7a6364 Expand ordering explanation 2020-08-17 09:25:39 +02:00
Vini Brasil f11ca077ec Add since doc to String#myers_difference/2 (#10268) 2020-08-15 15:07:22 +02:00
Adriano Mitre 0b51e0129e Make child specification docs more accurate (#10267) 2020-08-15 10:29:05 +02:00
Todd Resudek 0914d1d312 Add @since to System.os_time, System.schedulers and System.schedulers_online (#10266) 2020-08-14 21:38:00 +02:00
Dominika a0cef3bdd7 Update string_to_quoted spec (#10265) 2020-08-14 14:54:14 +02:00
Eksperimental df449805c8 Revise use of Note and Notice verbs (#10264) 2020-08-14 07:59:34 +02:00
Eksperimental bc73ad46ef Mention missing required key syntax in Typespecs page (#10261) 2020-08-13 09:47:07 +02:00
José Valim e1e8f9afec Add column information to SyntaxError and TokenMissingError 2020-08-12 20:14:31 +02:00
José Valim afa6d0c177 Add test for invalid tokenizer expressions 2020-08-12 14:18:13 +02:00
marekzajac97 11ce4999c5 Fix not being able to escape "|" inside a table (docstring) (#10254) 2020-08-10 15:19:50 +02:00
José Valim d332c78e3b Improve docs for Kernel.var!, closes #10251 2020-08-06 08:05:40 +02:00
Henrik Nyh ba1e45a08d Add Access.at! (#10193) 2020-07-28 16:38:17 +02:00
Eksperimental a19808942f Fix Code.Typespec.spec_to_quoted/2 when union in %{__struct__:} is used (#10238)
Originally reported in ExDoc.
https://github.com/elixir-lang/ex_doc/issues/1239

Code.Typespec.spec_to_quoted/2 wouldn't know how to deal with a
map with __struct__ key that is not a module, such as in:

@spec foo(%{__struct__: Foo | Bar}) :: any()
2020-07-28 16:37:41 +02:00
Eksperimental cebfb83a7e Rename "initial" argument to "default" in Dic and HashDict (#10233)
To be consistent with recently introduced changes: #10228, #10223
2020-07-27 16:54:10 +02:00
José Valim 9cd30ce651 Update fetch_env application feedback, closes #10225 2020-07-27 09:50:59 +02:00
Diogo Magalhães Martins c025240fb0 Fix ambiguity on Path.expand/1 docs (#10231) 2020-07-27 09:32:57 +02:00
Eksperimental 0a0ff7fa9a Make spec clearer for update functions in Keywords (#10228)
Inspired by c1a538e4a8 (#10223)

* Fixes the spec of Keyword.get_and_update!/3 that was missing the :pop return value for the update function
* It removes the concept of the "get" value and replaced it consistently with "current value"
* Renames "initial" argument to "default"
* Uses "existing value" when applicable
2020-07-23 21:10:04 +02:00
José Valim 562fd7cc2c Conform www-url-encoded parsing to whatwg spec
See: https://url.spec.whatwg.org/#application/x-www-form-urlencoded
2020-07-23 09:27:29 +02:00
Eksperimental c1a538e4a8 Make spec clearer for update functions in Map (#10223)
* It removes the concept of the "get" value
* Renames "initial" argument to "default"
* Makes use of the concept of "current value" which was already present in some
  functions, and uses this in the examples and the specs consistently
2020-07-23 08:57:49 +02:00
Eksperimental 2013b4dc34 Improve Kernel documentation (#10222) 2020-07-22 20:22:58 +02:00
Oliver Severin Mulelid-Tynes 760cf2ccb6 Update Map.update example to use full lambda syntax on first example (#10221) 2020-07-22 19:08:30 +02:00
Eksperimental 512594c08a Mention file:line in Already defined as ... error message (#10219) 2020-07-22 14:59:37 +02:00
Eksperimental 660fc86ede More improvements to operator docs (#10220) 2020-07-22 14:44:12 +02:00
Eksperimental 7b27ffa7de Improvements to operator functions and page (#10218) 2020-07-22 07:59:52 +02:00
Eksperimental b0b0f8e0fd Improve keyword list definition and introduce the concept of key (#10215) 2020-07-21 09:56:31 +02:00
Eksperimental d38a9b8112 Clarify use of Enum.member?/2 in in/2 operator (#10216) 2020-07-21 09:55:40 +02:00
Eksperimental 72f70de5fd Improve Operators documentation (#10217)
- Use "less-than", "greater-than", and "equal to" operators. This the actual name used by Wikipedia and Unicode.
- Give a name to every operator in Kernel.
- Minor improvements here and there.
2020-07-21 09:54:44 +02:00
Eksperimental 5834b14433 Raise ArgumentError in Keyword.keys when list is not a keyword list (#10214)
Previously it would return something like this:

** (FunctionClauseError) no function clause matching in anonymous fn/1 in Keyword.keys/1

    The following arguments were given to anonymous fn/1 in Keyword.keys/1:

        # 1
        {"fetch/2", {:fetch, 2}}

Closes #10010, and it improves 3fd68ef62a
2020-07-21 09:52:29 +02:00
Eksperimental d0ec4296ba Small rewording in Supervisor.Spec (#10212) 2020-07-20 23:19:25 +02:00
Eksperimental 4822cb230c Fix typo in comment (#10211) 2020-07-20 23:06:58 +02:00
Eksperimental 71503e07bd Update typespecs and enforce with and limit in Inspect.Algebra (#10205) 2020-07-18 17:01:28 +02:00
José Valim 92cf894756 Require a trailing underscore to consider it a compiler variable 2020-07-17 13:59:52 +02:00
Juha 854db25440 Fix markdown codeblock rendering issue (#10202) 2020-07-16 19:39:38 +02:00
José Valim ebc57cdd16 Revert "Add support for :hour and :minute time units (#10185)"
This reverts commit 35f6ff827c.
2020-07-16 18:35:45 +02:00
Fernando Tapia Rico fc6bf59462 Add List.Chars to bootstrap modules
If there is a compile error, Kernel.ParallelCompiler raises
`** (UndefinedFunctionError) function List.Chars.to_charlist/1 is
undefined (module List.Chars is not available)`.
2020-07-16 13:20:38 +02:00
Eric Meadows-Jönsson f80fedde81 Remaining map guards should add optional keys
Closes #10148.
2020-07-16 01:47:17 +02:00
José Valim 6228ade7d2 Do not warn if quotes are used on complex atoms
Atoms that have non-ascii characters or @ does not
require tokens. That's to streamline the developer
experience around examples :"foo@computer-name" and
:"hélló".
2020-07-15 20:10:31 +02:00
José Valim 08706cc490 Warn if a variable that looks like a compiler variable is unused (#10198)
Closes #10197.
2020-07-15 12:20:49 +02:00
Eksperimental 5e591ebfc6 Fix warnings detected by future version of ExDoc (#10195) 2020-07-15 12:20:19 +02:00
Henrik Nyh 41159e562f Remove incorrect arities in test descriptions (#10194)
These tests actually use get_and_update_in/3 and pop_in/2.

I removed the arities, rather than correcting them, since it seems
like unnecessary detail here.
2020-07-15 00:07:04 +02:00
Parker Selbert 35f6ff827c Add support for :hour and :minute time units (#10185)
This enhances time unit aware functions in the `Time` module so that
they can operate on `:hour` and `:minute`, along with standard
`System.time_unit/0` values. This eliminates the need to convert all
values to seconds, which allows more expressive time manipulation.

Along with changes to `Time.add/3` and `Time.diff/3`, this adds
a new extended `time_unit` type to `Time`.
2020-07-14 20:34:20 +02:00
Eksperimental 98f2201e6d Use "bytecode" instead of "byte code" (#10189) 2020-07-14 15:44:58 +02:00
José Valim 5fa00e5260 Clarify to_unix docs 2020-07-14 11:46:34 +02:00
Eksperimental b04089d9b9 Enforce typespec limitation in bitstring unit (#10187) 2020-07-14 08:11:37 +02:00
José Valim d135c7f8ca Add Date.day_of_week/2, beginning_of_week/2, and end_of_week/2 (#10181)
This augments the Calendar behaviour by adding
a new function, c:Calendar.day_of_week/4 which
supports a starting_on value with defaults and
calendar specific semantics.
2020-07-13 12:29:36 +02:00
Wojtek Mach 9f6e39d1b2 Update Date.range/2 to accept t:Calendar.date/0 (#10182) 2020-07-13 11:09:17 +02:00
Tomasz Marek Sulima c192083726 Add is_exception/1 and is_exception/2 guards (#10180) 2020-07-12 13:55:11 +02:00
José Valim b3d6aff7b6 Load config/runtime.exs in escripts 2020-07-11 18:30:46 +02:00
José Valim 7aa93b188c Improve compiler error message when using | in a def pattern 2020-07-11 10:22:28 +02:00