Commit Graph
2417 Commits
Author SHA1 Message Date
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 b78c3bc36b Add Stream.resource/3 2013-12-09 18:14:34 +01:00
José Valim 34c2c50f42 Merge pull request #1916 from augiedb/master
Add examples to URI
2013-12-08 00:32:56 -08:00
Augie De Blieck Jr. 6f219ad1da Clean up formatting error 2013-12-07 23:22:03 -05:00
Augie De Blieck Jr. 2487d741b6 Add examples to url.ex
Examples for encode_query, encode, decode, decode_query, query_decoder, and parse.
2013-12-07 23:20:18 -05: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
Augie De Blieck Jr. 827507603a A series of minor description text changes for clarity and consistency.
Lines 909 and 259 were missing words. Other changes are made for minor grammatical clarity and consistency.
2013-12-05 22:56:10 -05:00
José Valim 0977602647 Create consolidation directory before writing to it 2013-12-04 12:02:22 +00:00
John Warwick fa56d91c08 Cleaning up Macro docs 2013-12-03 14:54:45 -05:00
José Valim 5dfa6ae618 Ensure macro expansion does not expand on variables 2013-12-02 13:00:41 +01:00
José Valim 1fbb6871a0 Add more hygiene examples 2013-12-02 06:53:44 +01:00
Miroslav Prymek 60c4ede916 Fixed docstrings in URI 2013-12-01 00:28:18 +01:00
John Warwick c1bedd5dce Cleaning up Exception docs (and other Kernel doc typos) 2013-11-30 14:31:42 -05: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
José Valim a829da1775 Reduce the size of String.Graphemes module
Based on a suggestion @krestenkrab and an initial implementation
proposed in #1902, we can reduce the total size of the String.Graphemes
beam file by ensuring the function clauses for next_grapheme are
similar.

We have done this by implementing next_grapheme in a tail recursive
fashion and using binary_part to select the first bits. The end result
is a consistently 33% faster graphemes operation for ascii strings
and only 10% slower operation for heavy unicode strings (which may
be further optimazable).
2013-11-29 12:48:01 +01: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 89c4822fa0 Add typespecs to List 2013-11-26 22:55:57 +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 63fdbfb8cf Implement Module.eval_quoted in Elixir 2013-11-25 12:59:14 +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
José Valim fd3d8b3b98 Share quote annotations with unquote fragments 2013-11-25 09:06:01 +01:00
José Valim e0354005ea Simplify get_opt(internal) handling 2013-11-25 09:06:01 +01:00
José Valim da34ccd54e Simplify lookups in elixir_dispatch 2013-11-25 09:06:01 +01:00
José Valim 4460770981 Update kernel.ex 2013-11-24 14:19:51 +01:00
Yuki Ito 5782dae432 Fix error message of access
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2013-11-24 13:46:38 +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 d7179b404b Port module_nesting handler to Elixir 2013-11-24 13:42:01 +01:00
José Valim be71239b7c Move more code to Elixir land, simplify serialization 2013-11-24 13:28:50 +01:00
José Valim a8bdd19a03 Implement defmodule in Elixir 2013-11-24 11:53:41 +01:00
José Valim 720d1e2a71 Refactor aliases handling before we move defmodule to Kernel 2013-11-24 09:33:38 +01: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