Commit Graph
836 Commits
Author SHA1 Message Date
Yurii Rashkovskii 97d9db2a8f Changes = operator to :: for typespec annotations 2012-06-01 11:03:44 -07:00
Yurii Rashkovskii adf7df4f3b Adds support for multiple defspec clauses for the same function 2012-06-01 11:02:47 -07:00
Yurii Rashkovskii 33e290d197 Improves indentation in typespec_test.exs 2012-06-01 11:02:47 -07:00
Yurii Rashkovskii ca67bfe64c Replaces or with | in typespecs 2012-06-01 11:02:47 -07:00
Yurii Rashkovskii 90929bd08e Initial implementation of deftype, deftypep and defspec 2012-06-01 11:02:47 -07:00
José Valim 9220637a3c Ensure nice stack trace on compiled callbacks, closes #314 2012-06-01 12:33:21 +02:00
José Valim 9d596a1f39 Add tests to ensure proper stacktrace on macro calls 2012-06-01 11:48:39 +02:00
Carlos Galdino b02f19dc81 Use refute instead of negative assert 2012-05-31 13:27:17 -03:00
Carlos Galdino 3352b07275 Add File.write 2012-05-31 11:22:30 -03:00
José Valim c926b7f943 Ensure aliases can be overriden 2012-05-31 13:19:21 +02:00
José Valim 9947f6a405 Simply let unhandled -> fail, closes #315 2012-05-31 13:02:01 +02:00
José Valim 5710630e2f Regex is not multiline by default, closes #310 2012-05-30 21:50:02 +02:00
José Valim 2973c34224 Support :as in defdelegate, closes #311 2012-05-30 09:31:27 +02:00
José Valim 198a3f6291 Generate keywords at compile time, so we don't need to sort nor loop at runtime 2012-05-30 08:54:13 +02:00
Yurii Rashkovskii 27ad9423f8 Renames record's to_keyword function to_keywords 2012-05-29 19:26:04 -07:00
Yurii Rashkovskii 243a32f2d1 Adds to_keyword(record) function to all records
This function can be used to convert any record to a Keyword:

    iex> defrecord A, a: 1, b: 2, c: nil
    nil
    iex> A.new
    A[a: 1, b: 2, c: nil]
    iex> A.new.to_keyword
    [{:a,1},{:b,2},{:c,nil}]
    iex> A.new(c: "a").to_keyword
    [{:a,1},{:b,2},{:c,"a"}]
2012-05-29 14:32:00 -07:00
Rafael Mendonça França 821e668361 Test File.read with a utf8 file 2012-05-29 17:42:11 -03:00
José Valim fbaa46618c Merge pull request #309 from elixir-lang/file_improvements
Add mkdir and mkdir_p
2012-05-29 08:03:37 -07:00
Rafael Mendonça França 488066d4cd Add mkdir_p 2012-05-29 11:58:45 -03:00
Rafael Mendonça França 16843c7c39 Copy edit documentation [ci skip] 2012-05-29 11:33:57 -03:00
Rafael Mendonça França a1cb84d2cc Add File.mkdir 2012-05-29 11:33:52 -03:00
José Valim 8b814ded29 Be more strict on inspect since we cannot be sure of the list encoding 2012-05-29 13:35:34 +02:00
José Valim fb8b6f53f2 Deprecate refer in favor of alias, use atom aliases throughout source code 2012-05-28 14:24:47 +02:00
José Valim aaf6c91e0e Rewrite use in Elixir, force it to rely on __CALLER__ 2012-05-28 13:23:04 +02:00
José Valim 088eff4c19 Rewrite access macro in Elixir \o/ 2012-05-28 12:00:18 +02:00
José Valim 2714642b1e Add Macro.expand_aliases 2012-05-28 11:05:49 +02:00
José Valim b3e49a183d Deprecate in_guard special form in favor of the more flexbible __CALLER__.in_guard? 2012-05-28 10:20:30 +02:00
José Valim b08cdc8ec7 Simpler mechanism for references 2012-05-27 22:03:01 +02:00
José Valim cb18ab0a5d Add support to __CALLER__ inside macros 2012-05-27 18:19:03 +02:00
José Valim b685ded72d Fix a bug where nested super calls did not propagate properly 2012-05-27 17:58:31 +02:00
José Valim 0048852114 Initial spike with __ENV__ 2012-05-27 12:11:56 +02:00
José Valim 2d3386cedf Add support to %R 2012-05-26 11:43:03 +02:00
José Valim 94e1537ed0 Partials with fn also work with imported funs 2012-05-24 13:37:44 +02:00
José Valim 15ab61bb8b Add partial function application via fn, closes #297 2012-05-24 13:20:22 +02:00
José Valim a22cac102e Clauses out of sync now raises a warning
We also consider the current macro scope before raising
the warning, allowing meta-programming to work without
actually triggering the warning.
2012-05-24 10:58:44 +02:00
José Valim bdc695672f Add file directive to customize how functions are defined 2012-05-23 09:29:48 +02:00
José Valim 6dd2e89da9 Improve docs, skip unecessary linify calls 2012-05-23 08:48:22 +02:00
José Valim 2a16798210 Ensure in works inside function definitions, closes #298 2012-05-21 12:02:56 +02:00
José Valim 9c7be1114d Merge pull request #290 from ezkl/add-file-functions
Adding File.rootname, File.extname and File.dirname [#288]
2012-05-21 02:04:14 -07:00
José Valim dd1c92790e Ensure records can be created with no field, closes #299 2012-05-21 10:56:50 +02:00
José Valim 8a3439e6f3 Remove special conditions inside catch 2012-05-18 18:02:56 +02:00
José Valim 52cf46ea96 Support many args in -> exprs 2012-05-18 17:54:15 +02:00
José Valim 1b22d34749 Implement EEx rules 2012-05-18 14:52:07 +02:00
José Valim 6029467073 Fix EEx (currently it does not support functions) 2012-05-13 22:00:53 +02:00
José Valim 3ee2171585 Fix failing tests in Elixir.ErrorsTest 2012-05-13 19:03:26 +02:00
José Valim f9dd6f66a6 Remove function single do: definition syntax 2012-05-13 17:36:54 +02:00
José Valim 53ba7e7e85 Do not allow stab inside stab operators 2012-05-13 16:20:45 +02:00
José Valim e476a5ef0d Stab at new syntax 2012-05-13 15:33:57 +02:00
Ezekiel Templin d28b3f46c9 Fix type in tests 2012-05-10 08:58:06 -04:00
Ezekiel Templin 48e75e5bef Basic tests for File.rootname, File.extname and File.dirname 2012-05-10 08:41:18 -04:00