Commit Graph
1216 Commits
Author SHA1 Message Date
José Valim ba88ee7c92 Improve binary handling to properly consider chars and bitstring with specifiers
Closes #1963
2014-01-10 22:25:08 +01:00
José Valim bc852a6fba Add Enum.flat_map_reduce/3 2014-01-09 15:38:27 +01:00
José Valim b0e1c09579 Add Stream.transform/3
Note: the function name may be modified before the next release.
2014-01-09 13:54:45 +01:00
José Valim 19301b9005 Small improvements to records and others 2014-01-08 14:55:28 +01:00
Eric Meadows-Jonsson e169c0f49b Create a signature for callbacks 2014-01-07 23:00:07 +01:00
Eric Meadows-Jonsson 8c97056b0e Use :application.get_application/1 in stracktraces 2014-01-07 22:48:46 +01:00
Eric Meadows-Jonsson 4be1501f57 Annotated types should not be in guard vars 2014-01-07 22:10:47 +01:00
José Valim 0aff2a3139 Compile with relative paths and include apps in stacktraces
Closes #1964, closes #1861
2014-01-07 11:30:44 +01:00
José Valim 7c240199f3 Improve stacktraces and error messages during expansion 2014-01-06 19:34:38 +01:00
José Valim 27467bdb67 Fix spelling of overridden 2014-01-05 12:28:11 +01:00
José Valim 952052869f Ensure bitstring modifiers args are expanded 2014-01-04 22:44:55 +01:00
José Valim df8b216357 Reenable case clause rewriting, closes #1972 2014-01-04 10:45:18 +01:00
José Valim 79faa1f706 Do not export case and receive vars 2014-01-04 10:45:13 +01:00
José Valim cba7c5bd80 Only expand __ENV__.call if it is a known function 2014-01-03 22:39:48 +01:00
José Valim 5e2ea082d1 Deprecate __FILE__ in favor of __DIR__ or __ENV__.file 2014-01-02 18:10:59 +01:00
Eric Meadows-Jonsson 0a24252fca Properly handle tuples in typespecs 2014-01-02 14:35:54 +01:00
José Valim 3a0b4988fc Shut down GenFSM on unknown messages 2013-12-31 18:35:22 +01:00
José Valim b7bbe13c91 Remove non ansi handling from IO.ANSI.Docs 2013-12-31 17:59:24 +01:00
José Valim bbe63e9a93 Merge pull request #1975 from thmzlt/ansi_docs
Move IEx.ANSIDocs to IO.ANSI.Docs and decouple it from IEx
2013-12-31 08:47:19 -08:00
José Valim 6f0f0d5136 Merge pull request #1970 from chrismcg/gen_server_stops_on_unknown_requests
Stop GenServer on unknown call/cast request
2013-12-31 08:45:19 -08:00
José Valim e055c2ccf2 Merge pull request #1961 from justinj/float-parse-negative-0
Fix Float.parse to handle numbers of the form "-0.x", fixes issue #1960
2013-12-31 08:44:53 -08:00
José Valim 0aee0805a9 Merge pull request #1933 from Enders/elixirc_patterns
Elixirc: fail when one of the provided file pattern is missing
2013-12-31 08:33:15 -08:00
José Valim 6d17b42beb Ensure variables in remote do not leak to args 2013-12-31 11:54:15 +01:00
Thomaz Leite f98afc1d83 Fix IO.ANSI.Docs and its corresponding test 2013-12-30 21:57:10 -03:00
Thomaz Leite 6b407a339b Move IEx.ANSIDocs > IO.ANSI.Docs 2013-12-30 19:47:11 -03:00
José Valim 40d383faae Merge pull request #1973 from elixir-lang/jv-exp
Split elixir expansion from translation in the compiler
2013-12-30 03:51:41 -08:00
José Valim eaac3bbd76 Ensure aliases dispatch to the proper function, guarantee files are binaries 2013-12-30 12:38:36 +01:00
José Valim ae12432294 Ensure warnings are recorded only if there are no errors 2013-12-30 12:22:24 +01:00
José Valim d0a6792bdf Temporarily disable case clause rewrite optimization 2013-12-30 12:16:41 +01:00
José Valim 6e48e5dfcb Ensure we run lexical warnings for dynamic modules 2013-12-30 12:10:00 +01:00
José Valim 83c93beaa6 Get rid of environment macro counter in favor of a global one 2013-12-30 11:45:23 +01:00
Chris McGrath a2cc2623a8 Stop GenServer on unknown call/cast request 2013-12-29 22:12:45 +00:00
José Valim 254065d3c4 Clean up synax_error, asstions and merge mechanisms 2013-12-29 14:22:45 +01:00
José Valim 29b38ab9e0 Discard old dispatch 2013-12-29 12:23:38 +01:00
José Valim 0e627c9b09 Use expansion on function bodies 2013-12-29 10:54:10 +01:00
José Valim f8b019c7c8 Move to the new expansion on the front-end 2013-12-28 23:14:55 +01:00
José Valim c4419268b8 Move module compilation to rely on elixir_exp 2013-12-28 15:01:31 +01:00
José Valim ade26dedd8 Work on Elixir expressions rather than forms 2013-12-28 11:47:44 +01:00
José Valim 574e92fc57 Also expand binaries 2013-12-27 15:52:17 +01:00
Justin Jaffray 70d7a28a36 Fix Float.parse to handle numbers of the form "-0.x"
Since Float.parse uses Integer.parse, the -0 would be
parsed independently of what came after the decimal
point and would become 0
2013-12-25 10:35:24 -05:00
José Valim 78def5da6e Raise better message on invalid or reserved codepoints 2013-12-25 14:44:01 +01:00
José Valim ffe2cc74b8 Expand try 2013-12-25 13:20:49 +01:00
Yuki Ito 869378d1ca Remove unneeded assert in assert_raise 2013-12-25 17:48:58 +09:00
José Valim b39c762557 Rename redundant is_ prefix in internal APIs 2013-12-24 23:06:59 +01:00
José Valim 98e15914eb Expand receive 2013-12-24 14:23:22 +01:00
José Valim 8c47368fff Expand case 2013-12-24 13:48:58 +01:00
José Valim f81a15b7cb Expand fn 2013-12-23 18:23:08 +01:00
José Valim 51aef55c83 Change how -> is represented in the AST
The previous representation was very hard to compose
and very often required the AST nodes to be created
manually.

The current approach is easier to compose because
the node is represented as any other operator as long
as it is wrapped in parentheses.

For example, imagine we have pairs of patterns and
the code to be executed for that pattern, and we want
to inject them into a case. It can now be writen as:

    pairs = Enum.map pairs, fn { pattern, expr } ->
      quote do: (unquote(pattern) -> unquote(expr))
    end

    quote do
      case unquote(condition), do: unquote(pairs)
    end

Compare to the previous implementation:

    pairs = Enum.map pairs, fn { pattern, expr } ->
      { [pattern], [], expr }
    end

    pairs = { :->, [], pairs }

    quote do
      case unquote(condition), do: unquote(pairs)
    end
2013-12-23 16:10:33 +01:00
José Valim 2d36a76b26 Move capture to elixir_exp 2013-12-23 14:59:31 +01:00
José Valim 9f5e7c4a41 Fix expansion of =, inbits and inlist regarding rhs lexical info 2013-12-23 13:00:09 +01:00