Commit Graph
57 Commits
Author SHA1 Message Date
José Valim cea31f69dc Review and deprecate list <-> binary conversion 2013-08-14 11:16:37 +02:00
José Valim d8393f97ca Remove deprecated code 2013-08-06 17:21:40 +02:00
José Valim c6f9287ce7 Only raise on local macro conflicts if it was previously defined 2013-08-02 09:53:30 +02:00
José Valim 46fae17b7e Allow &() as a general capture mechanism 2013-07-31 14:53:22 +02:00
José Valim 095ac686cc Add expansion callsite to the end of the stacktrace, closes #1426 2013-07-16 11:40:18 +02:00
José Valim 2fee17e709 Deprecate Kernel.float/1 in favor of explicit conversion 2013-07-12 12:38:08 +02:00
José Valim 1c7a37a2b7 Raise proper exception on invalid quoted expression
We also documented valid types in Macro.t

Closes #1411
2013-07-12 09:29:57 +02:00
José Valim 15c1a9891c Implement bindings in Elixir 2013-07-04 10:18:46 +02:00
José Valim c572cb80fc Support binding/2 that goes across all contexts 2013-06-19 14:17:45 +02:00
José Valim d3122ddcc5 Add binding/0 and binding/1 for retrieving bindings 2013-06-18 16:14:03 +02:00
José Valim 19ff7a03f9 Ensure imports inside quotes are properly registered, closes #1225 2013-06-16 13:18:47 +02:00
José Valim 80e41f8b4b Allow +, -, and friends to be called dynamically
Our compiler still inline those calls. This commit simply
allows one to write:

    mod = Kernel
    mod.+(1, 2)
2013-06-15 10:45:12 +02:00
José Valim d19f6beca0 Provide source information to all dispatches and complement the API 2013-05-26 20:20:23 +02:00
José Valim da84a797b0 Module.DispatchTracker also records remotes 2013-05-26 20:20:23 +02:00
José Valim ffc91e3004 Rename Kernel.LocalsTracker to Module.DispatchTracker 2013-05-26 14:39:02 +02:00
José Valim c3e7543e48 Extract imports handling to locals tracker (soon to be renamed) 2013-05-26 14:39:02 +02:00
José Valim c3dd4006b0 Reduce atom footprint when compiling an elixir module 2013-05-25 16:37:33 +02:00
José Valim d757f31ccd Unused functions with cyclic dependencies are now also warned as unused
Closes #1105
2013-05-25 00:14:37 +02:00
José Valim 86e7069a0a Clean up how we store recorded locals in the imports table 2013-05-24 12:57:28 +02:00
José Valim 2c98c0999d An Elixir module now translates to Elixir.Module instead of Elixir-Module 2013-05-23 14:36:56 +02:00
José Valim 65e67cdc27 Ensure we emit a warning for recursive non used calls 2013-05-22 19:41:03 +02:00
José Valim 26640e3940 Start v0.9.0.dev work 2013-05-22 14:56:26 +02:00
José Valim 8907edca3e Improve error message for invalid patterns in guards and matches
Closes #1092
2013-05-19 21:39:44 +02:00
José Valim 32ae6d3424 Ensure imports respect the quote context 2013-05-13 15:56:15 -06:00
José Valim 5ce473152f Provide a more robust alias and import expansion
Now that we support { quoted, true }, we can know
before hand if an alias or import comes from a macro
and act accordingly.
2013-05-13 15:56:15 -06:00
José Valim f38cf28cbd Store in the AST if contents come from a quoted expression
This provides a more robust way of checking from where
the original expressions are coming from compared to the
lexical check_clauses field we had in elixir_scope.

A direct consequence of this commit is that, the following
code:

    defrecord Sample, [:hello] do
      import List
    end

Now raises a warning if the List import is not used,
where it didn't previously.
2013-05-13 15:56:15 -06:00
José Valim ddb87a96ca Private functions used by private macros no longer emit an unused warning, closes #885 2013-05-05 21:59:40 -06:00
José Valim 3e6e6ee99b Update exdoc links 2013-04-24 11:16:28 -06:00
José Valim c125636535 Ensure the macro system respects imports hygiene, closes #875 2013-04-13 18:25:43 -07:00
José Valim 531bd8da0c Ensure hygiene also works with directl calls to Kernel.function 2013-04-13 17:19:19 -07:00
José Valim a4d8fc2893 Ensure hygiene applies to function and partial applications 2013-04-13 17:19:19 -07:00
José Valim b96c3c52ae Remove check_require in favor of a meta tag 2013-04-13 17:19:19 -07:00
José Valim 3f7b867740 Refactor elixir_dispatch to rely more on elixir_scope 2013-04-13 17:19:19 -07:00
Yurii Rashkovskii 8d2034f07c Implement Record.import macro that allows using private macros on public records 2013-04-11 16:28:44 -07:00
José Valim ca0250a9d7 Refactor find_dispatch to loop data functions and macros lists just once 2013-04-10 15:47:37 -07:00
alexrp a34f38ee40 Only error on ambiguous imported function calls, not on the imports themselves. Fixes #788. 2013-04-11 00:18:09 +02:00
José Valim f7cad1cffc Improve error messages 2013-03-27 09:54:00 -06:00
José Valim 98e488a52d Aliases defined inside macros should be carried over 2013-02-26 14:18:37 -07:00
José Valim 5557e620ff Backwards incompatible change on before_compile and after_compile
Both callbacks now receive the environment as
first argument instead of the module.
2013-02-16 19:57:14 -07:00
José Valim 28211b2714 Ensure aliases expansion also works for implicit aliases 2013-02-03 21:57:39 -07:00
José Valim 89cbe93bba The AST now allows metadata to be attached to each node
This means the second item in the AST is no longer an integer
(representing the line), but a keywords list. Code that relies
on the line information from AST or that manually generate AST
nodes need to be properly updated.
2013-01-21 15:42:03 -07:00
José Valim 4e651c8aae Expand aliases inside quote 2013-01-11 09:55:38 +01:00
José Valim eaa9714b3a Improve hygiene for variables, related to #722 2013-01-10 14:29:45 +01:00
Yurii Rashkovskii 36c9e11064 Remove __info__/1 from __info__(:functions)
Closes #734
2012-12-24 12:51:09 +01:00
José Valim 743213d8c1 halt was moved to System module
`halt` is a function that is less frequently used than the other
functions in Kernel, not allowed in guard clauses and its outcome
is to shutdown the whole runtime, being a great fit to the System
module.
2012-11-13 09:23:21 +01:00
José Valim 2f3289aaef Try a different and simpler approach to clauses warnings, closes #567 2012-10-24 16:57:23 +02:00
José Valim 69e4f6c24c Make function naming consistent across modules 2012-10-10 08:54:38 +02:00
José Valim fac57e78b2 Ensure Kernel.__info__(:functions|:macros) returns the complete set 2012-10-05 15:45:28 -07:00
José Valim 6c87df4c7a If we are connected to a remote node, print "rem" in iex
This makes it easy to check if we are on a remote node or not.
2012-08-09 10:42:54 -03:00
José Valim 152c784a07 Add binary_part to the list of guard functions 2012-07-24 13:04:33 +02:00