José Valim
ed0eff4d1d
Fix failing erlang tests
2012-11-25 18:25:03 +01:00
José Valim
b9600fb6c4
More improvements to typespecs, closes #617
2012-11-25 17:43:56 +01:00
José Valim
5e26cd01b6
Improve error message when invalid token is followed by new line
2012-11-25 17:26:47 +01:00
Yurii Rashkovskii
775803be1a
WIP on bounded_fun support
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2012-11-25 17:06:30 +01:00
José Valim
9f16178898
Raise an error if clauses with different arities are defined in the same function, closes #657
2012-11-25 17:01:54 +01:00
José Valim
7ddab53707
Also allow multiclause functions on fn
...
The function macro is still necessary for function
retrieval and it will be extended when R16 is out
to supported named functions
2012-11-25 00:06:39 +01:00
Leo Lou
2984771883
Add String.strip/1
2012-11-24 22:59:51 +08:00
Leo Lou
875d1007a9
Strip whitespace characters instead of space in String.rstrip
2012-11-24 22:44:37 +08:00
Leo Lou
1c8993695d
Strip whitespace characters instead of space in String.lstrip
2012-11-24 21:07:18 +08:00
José Valim
600c8022ba
Deprecated Enum.qsort and List.sort in favor of Enum.sort
2012-11-23 21:51:11 +01:00
José Valim
5c967ace04
Add Enum.sort which uses merge sort and performs considerably faster than Enum.qsort
2012-11-23 20:10:26 +01:00
José Valim
87ab504e06
Perfomance improvements to Enum.drop/take
2012-11-23 18:51:10 +01:00
José Valim
44bcc00fce
Remove tests since utf-8 names on env variables are poorly supported depending on the OS and ERTS
2012-11-20 11:30:53 +01:00
José Valim
bd67df4d8c
CI doesn't like utf-8 chars as env, let's try iso
2012-11-20 11:16:05 +01:00
José Valim
224f5e47fe
Ensure System env functions properly handle utf-8 data
2012-11-20 11:09:53 +01:00
José Valim
0f75b92b25
/u is not required for Elixir regexes
2012-11-20 10:52:57 +01:00
Tim Fletcher
bddb614927
Fix percent encoding algorithm used by URI.encode
2012-11-20 00:09:59 +00:00
José Valim
7894ba0fc1
Add IO.binread, IO.binwrite and friends, closes #645
2012-11-16 09:42:35 +01:00
José Valim
40efeb48d7
Reduce atom footprint when compiling code
...
Previously, we were generating atom names based on
the file or the module name. This commit replaces
it by a pool of atom names. After a module name
is used and purged with success, it is added back
to the pool so it can be reused many times.
2012-11-15 16:44:27 +01:00
José Valim
32764b3370
Copy all __ENV__ information on eval
2012-11-15 10:01:18 +01:00
José Valim
2104b292c1
Ensure rstrip and strip work on emoty strings, closes #643
2012-11-14 10:34:43 +01:00
Carlo Cabanilla
b9692fc2fe
default record vals to :undefined instead of :nil
...
When translating erlang records into elixir records, use :undefined
as the default record value since that's what erlang uses, and
presumably you're going to be using these records with erlang apis.
2012-11-12 01:05:17 -05:00
José Valim
fcb1a610de
Add support for defrecordp
2012-11-10 11:51:13 +01:00
José Valim
02e63e4849
Ensure parenthesis can be used in macros and fn shortcut, closes #634
2012-11-08 15:52:52 +01:00
José Valim
e6c75bbe98
Merge pull request #632 from yrashk/is_keyword
...
Add keyword?/1 function
2012-11-08 03:08:58 -08:00
Yurii Rashkovskii
c6a012602c
Add Keyword.keyword?/1 function
2012-11-08 03:04:55 -08:00
Yurii Rashkovskii
1b15972d07
Suppress an unnecessary (optimization-related) warning in one of the kernel tests
2012-11-07 06:14:33 -08:00
José Valim
41dbbbf714
Merge pull request #626 from yrashk/typespec-inspect-improvements-record
...
Add support for printing record typespecs
2012-11-07 04:01:48 -08:00
Yurii Rashkovskii
1331f23a27
Add support for printing record typespecs
2012-11-07 02:40:45 -08:00
José Valim
52a5f5c9c9
Generate a proper clause var name
2012-11-06 10:19:23 +01:00
José Valim
30bfd4736d
Remove Calendar from the upcoming release
2012-11-05 15:19:10 +01:00
José Valim
e9334fb7dc
Tidy up Typespec API, improve docs
2012-11-05 14:51:51 +01:00
José Valim
ec68b7dd8a
Compile specs and callbacks to @spec and @callback so they are easier to access
2012-11-05 10:26:02 +01:00
José Valim
1113d3cfc9
Add support to record_type in defrecord
...
Closes #613
Closes #452
2012-11-05 09:14:07 +01:00
José Valim
1bf06bbc1a
Speed up protocols by concatenating modules at compilation time
2012-11-03 10:52:22 +01:00
José Valim
12d14edab5
Deprecate Enum.times, closes #619
2012-11-02 10:17:39 +01:00
José Valim
caa50368a7
Check if the first aliases argument is indeed an alias atom
2012-11-02 10:15:19 +01:00
José Valim
a144d27886
Warn that function definitions should start with lowercase characters or underscore, closes #620
2012-11-02 10:05:17 +01:00
José Valim
78c6c7201f
Keywords are allowed after . identifier, closes #621
2012-11-02 10:05:17 +01:00
Yurii Rashkovskii
5d2336d23e
Support annotated types in Kernel.Typespec.to_binary
2012-11-01 07:05:54 -07:00
José Valim
8280de5fa9
Merge pull request #615 from yrashk/specs-retrieval-fixes
...
Kernel.Typespec.types/1,3 should recognize typeps and opaques
2012-11-01 06:48:16 -07:00
Yurii Rashkovskii
8cadba5ea4
Kernel.Typespec.types/1,3 should recognize typeps and opaques
...
Also improves code reuse
2012-11-01 06:37:59 -07:00
José Valim
3750bcc8d1
Remove unused variables
2012-11-01 14:11:10 +01:00
José Valim
3fac73ea17
Merge pull request #609 from yrashk/iex-t
...
Implement a simple version of the t helper for the interactive shell
2012-11-01 05:23:03 -07:00
José Valim
01f9518899
Keep user's given name when rebinding variables
...
The following code:
counter = 1
counter = 2
Is now rewritten internally to:
counter = 1
counter@1 = 2
Which gives us a couple things:
1. Better debugging
2. We can now show warnings for rebound variables not used
Elixir also keeps `_@` prefix to store internal variables
(for example, `_@1`, `_@MODULE`, etc).
Closes #607 .
2012-11-01 12:37:08 +01:00
José Valim
11eb2d6d3c
Do not print elixir modules as keywords, closes #603
2012-11-01 10:04:05 +01:00
Yurii Rashkovskii
c00381780f
Implement a simple version of the t helper for the interactive shell (prints out type/spec information)
...
Also implements corresponding helper functions in Kernel.Typespec
2012-10-31 22:26:59 -07:00
Yurii Rashkovskii
84501090ce
Fix Kernel.Typespec.to_binary for tuple() type (with no element type specified)
2012-10-31 07:26:30 -07:00
José Valim
d305c96762
Keep arguments order on OptionParser
2012-10-31 12:40:03 +01:00
José Valim
3b33478cc0
Make typespecs compilation happen in two steps, closes #598
2012-10-31 09:44:16 +01:00