meh
a8959f3987
Fix Version.match? with ~> and -dev versions
2013-12-10 17:51:39 +01:00
José Valim
bce9116cff
Ensure full alias is stored in context_modules
2013-12-10 15:15:28 +01:00
José Valim
f62c26b9b6
Ensure record aliases in the same quote can be accessed, closes #1915
...
This commit also simplifies macro expansion for both imports and aliases
to always give higher preference to the macro environment rather than
the caller one, if such is available. The deal is to simplify both the
code and understanding of how macros work.
2013-12-07 20:01:11 +01:00
José Valim
0977602647
Create consolidation directory before writing to it
2013-12-04 12:02:22 +00:00
José Valim
5dfa6ae618
Ensure macro expansion does not expand on variables
2013-12-02 13:00:41 +01:00
José Valim
e424f02812
Ensure aliases defined in macros do not leak
2013-11-30 18:02:46 +01:00
José Valim
7dd9da12a7
Promote exception/1 as the best mechanism to customize exceptions
...
The previous mechanism of lazily customizing message/1 was very
dangerous, as you could have errors while calculating the message
and those would shop up just when the exception is printed, leading
to further breakage.
Closes #1747
2013-11-30 11:59:51 +01:00
José Valim
9ee79a16bb
Deprecate Macro.extract_args/1
2013-11-29 23:24:44 +01:00
José Valim
00431ebecb
Warnings rely on stdio and should be sync
2013-11-29 22:37:48 +01:00
José Valim
203ddd0c37
Merge pull request #1837 from zambal/decompose_call
...
Add Macro.decompose_call/1
2013-11-29 13:37:40 -08:00
Kresten Krab Thorup
6a7609d707
test cleanup as per comments
2013-11-29 14:30:10 +01:00
Kresten Krab Thorup
ec6f95d970
More precise regex exception match
...
This is for Erjang, which generates different
exception messages
2013-11-29 13:41:39 +01:00
José Valim
0e54cad8ee
Merge pull request #1901 from ericmj/defrecordp-dynamic
...
defrecordp support dynamic name and fields
2013-11-29 03:50:37 -08:00
José Valim
c093e378d8
Merge pull request #1900 from krestenkrab/krab-unicode
...
In response to "The string type is broken"
2013-11-29 03:49:18 -08:00
Eric Meadows-Jonsson
7d83083525
defrecordp support dynamic name and fields
2013-11-29 12:25:16 +01:00
Eric Meadows-Jonsson
9a0e8f38de
Remove record_test from eunit suite
2013-11-29 01:42:37 +01:00
Eric Meadows-Jonsson
ffb2258bb1
@type and friends support unquote fragments
2013-11-28 23:01:00 +01:00
Kresten Krab Thorup
d95a7d1a58
Fix comment
2013-11-28 16:46:17 +01:00
Kresten Krab Thorup
3a8d0ccbc2
Some more unicode tests
...
Since this blog post [1] caused some stir, I added
tests corresponding to how most languages referred
to are broken. Naturally, that's not the case for
Elixir.
[1] http://mortoray.com/2013/11/27/the-string-type-is-broken/
2013-11-28 14:35:09 +01:00
José Valim
4ed4f52121
Fix regression when using in with module attributes
2013-11-28 13:56:37 +01:00
Eric Meadows-Jonsson
1f4037b93c
Add List.update_at/3
2013-11-26 22:55:57 +01:00
Greg Vaughn
52cd9b359c
fix for issue #1896
...
If the enumerable is an even multiple of the counter (n) and an explicit
pad is given, you get an extra element.
Enum.chunks([1,2,3], 3)
iex> [[1,2,3]]
as expected, but
Enum.chunks([1,2,3], 3, 3, [""])
iex> [[1,2,3],[""]]
as not expected
2013-11-26 13:33:48 -06:00
José Valim
09869ec135
Improve typespecs when formatted as strings
2013-11-26 09:15:39 +01:00
José Valim
5c00882bff
Update CHANGELOG
2013-11-25 11:39:02 +01:00
José Valim
043edd4990
location: :keep only affect function definitions
...
This commit changes how metadata is stored once location: :keep
is used and also removes the __scope__ special form.
Closes #1877
2013-11-25 11:35:00 +01:00
Yuki Ito
494659ab1c
Ensure that Macro.expand_once/2 works with HashDict
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2013-11-24 13:45:59 +01:00
José Valim
08afaa7982
Merge pull request #1893 from elixir-lang/jv-ex-in-ex
...
This merge moves most of the macros implemented in erlang to elixir.
The exceptions are `case/2`, `try/2` and `receive/1` that cannot be written
in Elixir and therefore were converted to special forms.
On the plus side, `var!/1`, `var!/2` and `alias!/1` were converted to regular
macros (and demoted from special forms).
This also simplifies dispatching, as we no longer need to special case
some of the Kernel macros.
2013-11-24 04:44:42 -08:00
José Valim
f685f5d2a5
Implement left in right in Elixir
2013-11-23 12:21:07 +01:00
José Valim
0a84b90373
Move super? to Elixir as well
2013-11-23 11:09:51 +01:00
José Valim
f98cda71c0
Implement var! and alias! in Elixir
2013-11-23 10:54:40 +01:00
José Valim
b28c95d31a
Move case/try/receive to special forms
2013-11-23 10:35:10 +01:00
José Valim
abec6af3ac
Move function/macro definitions to Kernel
2013-11-23 10:17:57 +01:00
José Valim
f8380e9dcd
Get rid of unused _@MODULE var
2013-11-22 22:41:30 +01:00
José Valim
f4144a63f8
Automatically handle File.stream and File.binstream based on modes
2013-11-22 16:51:06 +01:00
José Valim
2655a318c2
Move some macros back to __op__ to work around bug in erl_eval
2013-11-22 15:42:12 +01:00
José Valim
398e0fd3fb
Convert remaining operators
2013-11-22 14:39:11 +01:00
José Valim
1096cd00b9
Move arithmetic ops to Kernel
2013-11-22 13:29:02 +01:00
José Valim
a6c19950a0
Merge pull request #1878 from pminten/intersperse
...
Enum.intersperse, change to join
2013-11-21 04:53:02 -08:00
Peter Minten
e1ff60a57d
Add Enum.intersperse
2013-11-21 13:45:41 +01:00
Eric Meadows-Jonsson
fe3d1b1cfe
Add Enum.reverse/2
2013-11-20 15:44:08 +01:00
José Valim
e65eee49c4
Make inspect in general 20% faster
...
There are two main optimizations:
1. We have optimized Module.concat/2 (it is roughly 100% faster)
2. We have optimized rendering of Inspect.Algebra by skipping
the intermediate s_doc representation. This reduces memory
allocation and skips one extra pass on rendering.
2013-11-19 10:21:31 +01:00
Alexei Sholik
4358386906
Implement List.delete_at
2013-11-18 12:53:54 +02:00
Eric Meadows-Jonsson
985ce8e031
Switch Enum.drop/take behaviour for negative counts
2013-11-16 23:01:25 +01:00
José Valim
cfa2aad8b4
Merge pull request #1868 from ericmj/typespecs
...
Add is_var/1 to typespecs and move guards to end of spec
2013-11-16 00:27:12 -08:00
José Valim
c6a50d960e
Improve coverage for streams with nested accs
2013-11-14 19:13:08 +01:00
Eric Meadows-Jonsson
f125d19854
Move typespec guards to end of spec
...
Moves precedence of `when` to be lower than `::`.
2013-11-11 10:08:24 +01:00
Eric Meadows-Jonsson
1ce2e24f5d
Add is_var/1 for use in typespec guards
...
Allows you to specify a variable without any type contraints.
2013-11-11 10:08:24 +01:00
parroty
4931629b51
Add :++, :-- and :** to Macro#binary_op_props
2013-11-10 22:25:42 +09:00
José Valim
0d3aa7fd66
Improve some Kernel error messages
2013-11-06 16:14:31 +01:00
José Valim
55ecdba77c
Make test that changes global state sync
2013-11-06 15:00:00 +01:00