José Valim
c1e81f171f
Update enum.ex
2019-01-01 16:21:01 +01:00
Eksperimental
05363f77f8
Improve documentation for Enum.take/2 ( #8581 )
...
It was confusing to say in the summary that:
"Takes the first `amount` items from the `enumerable`."
when it can be from the end as well, depending on the sign of `amount`.
2018-12-31 13:38:30 +01:00
Wojtek Mach
759a2ba133
Update System.build_info/0 docs ( #8578 )
2018-12-29 12:09:00 +01:00
Jon Anderson
e3dacf07b3
Add additional guards for Keywords.merge/3 ( #8574 )
2018-12-29 11:12:30 +01:00
Eksperimental
a0f451bc0e
Add missing deprecation related to mix compile.erlang ( #8577 )
2018-12-29 11:09:45 +01:00
Eksperimental
61b36e34fc
Improve spec and documentation for System.build_info/0 ( #8575 )
...
- Give more detailed spec
- Correct mention to keyword list when it is a map that it returns.
- Compile a list of keys returned and what each one is
- Add example
2018-12-29 11:08:18 +01:00
José Valim
53855cec8e
More docs to child specs
2018-12-28 21:12:28 +01:00
Wojtek Mach
3d7b40b001
Make KeyError.message/2 private ( #8573 )
...
It was introduced accidentally in #7803 (no docs, no specs)
2018-12-27 23:44:49 +01:00
José Valim
1ba9859e9e
Improve docs for supervised proceesses
2018-12-27 23:03:16 +01:00
José Valim
b5f6e8e4b2
Default to required map keys
...
This aligns the behaviour with atoms keys and maps
for state without forcing everyone to pick one or
the other.
For clarity, developers can always use required/optional.
2018-12-27 17:14:21 +01:00
nico piderman
a15b07a283
User defined types with the name record fail to compile in 1.8.0-rc.0 ( #8569 )
...
Closes https://github.com/elixir-lang/elixir/issues/8564
This is my first attempt to contribute code to elixir, so please forgive me if this PR is completely naive.
Besides adding the `is_list/1` guards, I have updated the error message to specify that record specifications must use an atom `literal` as the name, to make it clear that the type `atom` is also not valid.
2018-12-27 17:06:13 +01:00
José Valim
0e15f809bb
Avoid race conditions on behaviour checks, closes #8568
2018-12-27 16:29:33 +01:00
José Valim
1995202862
Streamline supervisor docs
2018-12-27 14:54:14 +01:00
José Valim
dd531317c4
Improve docs for Mix.Config
2018-12-25 17:53:49 +01:00
José Valim
ad4a363232
Swap argument order to avoid failures on OTP master
2018-12-22 10:04:28 +01:00
José Valim
7123901baa
Improve OptionParser docs a bit further
2018-12-22 09:10:15 +01:00
José Valim
579a3e197b
Provide a quick introduction to OptionParser in mdocs
2018-12-22 00:36:01 +01:00
Eksperimental
d19701dc91
Correct use of repetitive "otherwise" in Map.get/3 ( #8556 )
2018-12-21 22:00:10 +01:00
Eksperimental
dfe34380ca
Add Supported Erlang/OTP versions for v1.9 ( #8552 )
2018-12-21 18:10:59 +01:00
Eksperimental
ec50dcead3
Add Supported Erlang/OTP versions for v1.8 ( #8549 )
2018-12-21 18:01:14 +01:00
Wojtek Mach
784e076a61
Improve defprotocol/2 docs ( #8548 )
...
* `__protocol__` doesn't accept `:name`
* Elaborate on atoms that `__protocol__` accepts
* Change code example to doctest and fix it
2018-12-21 17:42:43 +01:00
José Valim
5b349504f4
Move simple_one_for_one deprecations to v1.10
2018-12-21 13:49:12 +01:00
José Valim
0c1df34645
Standardize more TODOs
2018-12-21 13:42:54 +01:00
José Valim
d85ed42765
Update removal and deprecation annotations
...
In particular, all deprecated code would be removed on v2.0,
so we don't need to annotate dperecated code with a TODO to
remove it on v2.0.
2018-12-21 13:27:06 +01:00
José Valim
93cf82f141
Start v1.9
2018-12-21 13:04:21 +01:00
Fernando Tapia Rico
450261295f
Deprecate %{key => value} in typespecs ( #8537 )
...
%{required(foo) => bar} and %{optional(foo) => bar} should be used.
2018-12-21 12:55:57 +01:00
José Valim
2d139352bb
Fix cond scope and improve coverage, closes #8542 ( #8544 )
2018-12-21 12:54:04 +01:00
José Valim
5ce4b61991
Add :reduce to for comprehensions ( #8531 )
2018-12-21 12:51:28 +01:00
Sergio Espeja
7634f3f4c9
Minor doc changes in Collectable protocol moduledoc ( #8543 )
...
In the example, add the type the protocol is implemented for (`MapSet`).
2018-12-20 20:43:36 +01:00
José Valim
d48207555a
Move regexes guard up for better error messages, closes #8538
2018-12-18 11:31:14 +01:00
Fernando Tapia Rico
da561ca876
Raise compile errors on bad record types
...
The record name must be an atom.
These checks were previously performed by erl_lint.
2018-12-18 00:21:00 +01:00
Fernando Tapia Rico
f702f932a2
Raise compile errors on bad binary types
...
Both size and unit must be non-negative integers.
These checks were previously performed by erl_lint.
2018-12-18 00:21:00 +01:00
Fernando Tapia Rico
b3f59d9f9c
Raise compile errors on bad range types
...
Both sides of the range must be integers (after expansion), and
the "first" value must be greater than the "last" value.
These checks were previously performed by erl_lint.
2018-12-18 00:21:00 +01:00
José Valim
24ff3df592
Remove week_of_year
...
We are uncertain this is the best API to expose this
information. Maybe it is best to expose this as a separate
calendar. That uses the week-based year and week-based
month in the Date/Time structs.
2018-12-17 10:21:35 +01:00
shayne
fb97713bce
Add missing typespecs to Macro.underscore/1 ( #8536 )
2018-12-17 09:43:19 +01:00
José Valim
3f6dd0b321
No longer wrap expression in binary as Erlang/OTP 20+ does it by default ( #8530 )
2018-12-16 20:23:24 +01:00
José Valim
ec2e092fdd
Add no_spawn_compiler_process option to previous OTP releases
...
Because Elixir may be compiled with Erlang/OTP 20
to run on Erlang/OTP 22.
2018-12-15 23:20:26 +01:00
Eksperimental
93ceb95e76
Simplify custom links when linking to Kernel and SpecialForms ( #8528 )
...
Now that ExDoc automatically links to functions in
Kernel and Kernel.SpecialForms, when linking to them in custom links,
we can leave out the module name.
2018-12-15 08:44:27 +01:00
Dennis Beatty
f244ee310f
add hint for behaviours on UndefinedFunctionErrors ( #8517 )
...
This is the first pass on #8513 . I would love any feedback you have on this.
2018-12-14 17:21:27 +01:00
Eksperimental
bd37919247
Improvements to Operators guide ( #8512 )
2018-12-14 09:58:43 +01:00
Fernando Tapia Rico
31e177d0aa
Minor doc changes in the Protocol.consolidate/2 ( #8518 )
...
[ci skip]
2018-12-13 14:26:33 +01:00
José Valim
bb5a66698c
Raise for capture outside of function, closes #8516
2018-12-13 11:20:18 +01:00
José Valim
55ead12b0a
Move record warning to warning test file
2018-12-11 19:50:22 +01:00
José Valim
95934e56c4
Add $callers tracking to Task ( #8510 )
...
This allows us to track which process invoked the Task
besides its ancestors in the supervision tree.
Closes #7995
2018-12-11 19:05:53 +01:00
Eksperimental
51187a3acb
Touch-ups to String.jaro_distance/2 ( #8506 )
2018-12-11 19:05:41 +01:00
Eksperimental
f43d9095e9
Replace quotation marks ( #8505 )
...
Replaces "’" U+2019 RIGHT SINGLE QUOTATION MARK with
"'" U+0027 APOSTROPHE.
Replaces “ (U+201C LEFT DOUBLE QUOTATION MARK)
with " (U+0022 QUOTATION MARK).
2018-12-11 15:19:06 +01:00
eksperimental
4e7c652db3
Replace en-dash with regular hypen
...
Replace en-dash "–" (U+2013 EN DASH) with regular hyphen "-" (U+002D HYPHEN-MINUS).
While correct, it is reported in #4408 that it will not display correctly em-dashes in
Windows terminals.
README file is updated accordingly for consistency.
While https://en.wikipedia.org/wiki/Jaro–Winkler_distance uses an en-dash,
it is replaced to avoid the problem in Windows terminals, since Wikipedia
takes care of the redirection.
2018-12-11 14:42:29 +01:00
Eksperimental
886f871afb
Fix day in t:File.erlang_time ( #8503 )
...
Bug recently introduced in 499446737e
2018-12-11 13:16:28 +01:00
Michał Muskała
f7935d9351
Make sure records use the dsetelement optimisation ( #8062 )
...
Closes #8059
Additionally some more refactorings of the Record module
2018-12-11 12:44:02 +01:00
Eksperimental
d5c5e7eb5f
Revamp List.ascii_printable?/2 ( #8491 )
...
- Simplify logic
- Add specs
- Validate specs with guards, raising on non-lists
- Add tests
- Correct documentation about improper lists
- Rename argument `counter` to `limit`
2018-12-11 11:53:15 +01:00