Kodi Arfer
210086c7ca
Clean up the decorators used in the compiler
2018-05-20 14:11:35 -07:00
Kodi Arfer
98fbdcfc50
Move @builds(HyExpression) next to other @builds
2018-05-20 14:11:35 -07:00
Kodi Arfer
a933646bdd
Use model patterns for the remaining special forms
2018-05-20 14:11:35 -07:00
Kodi Arfer
8b2733e921
Use model patterns for comprehensions
...
I haven't bothered to refine the patterns for these since I intend to completely overhaul the comprehension forms in the near future.
2018-05-20 14:11:35 -07:00
Kodi Arfer
41d3f26001
Use model patterns for comparison and math ops
2018-05-20 14:11:35 -07:00
Kodi Arfer
57b5fa49b1
Unify illegal special forms
2018-05-20 14:11:31 -07:00
Kodi Arfer
45e8783997
Use model patterns for `fn`
2018-05-20 14:07:44 -07:00
Kodi Arfer
3ebff987e0
Use model patterns for `defclass`
2018-05-20 14:07:44 -07:00
Kodi Arfer
9368e4bc4e
Use model patterns for `import` and `require`
...
In the process, I've banned the syntax `(import [foo])` in favor of `(import foo)`.
2018-05-20 14:07:44 -07:00
Kodi Arfer
11f1c149ef
Use model patterns for `try`
2018-05-20 14:07:44 -07:00
Kodi Arfer
79c02514b9
Introduce the use of model patterns
2018-05-20 14:07:44 -07:00
Philip Xu
8a83d0c1ea
Fixes #1605 : remove macros ap-pipe and ap-compose
...
Anaphoric macros do not work well with point-free style programming, in
which case both threading macros and `comp` are more adequate.
2018-05-20 13:52:51 -07:00
gilch
049c78f5d5
Fix bug in let's handle-dot.
2018-05-18 10:40:59 -07:00
gilch
e7ac4ec859
fix botsbuildbots for #1582
...
This is preventing Hy from installing.
Closes #1599
#1601 would make this moot, but fixing it is the more conservative change. Pick one or the other. This `botsbuildsbots` doesn't do anything important. It's just one of our Easter eggs.
2018-05-06 19:55:16 -06:00
gilch
9d1304aacd
Remove lambda list unpacking handling in `let`.
2018-05-04 10:40:22 -07:00
Kodi Arfer
a2aeca2338
Remove tuple unpacking in lambda lists
2018-05-04 10:40:22 -07:00
Simon Gomizelj
7c3477e738
Fix a bug where the compiler doesn't properly handle unquote-splice
...
Added test coverage as well
2018-04-30 09:38:57 -07:00
Kodi Arfer
c7ac4c60c4
Fix a bug that caused `try` to drop expressions
2018-04-30 09:18:01 -07:00
Kodi Arfer
ec1c92bf4e
Allow `for` with an empty body
2018-04-29 19:51:00 -07:00
Kodi Arfer
b7e5c5f17a
Allow `while` with an empty body
2018-04-29 19:51:00 -07:00
Kodi Arfer
87aced2370
Don't let HyExpression etc. inherit from HyList
...
This means the compiler no longer allows e.g. `(fn (x) ...)` in place of `(fn [x] ...)`.
2018-04-29 19:17:47 -07:00
Simon Gomizelj
032247e380
Merge pull request #1588 from Kodiologist/no-amp-key
...
Remove &key
2018-04-27 00:21:11 -04:00
Ryan Gonzalez
fbeff8d25c
Merge pull request #1587 from Kodiologist/no-empty-catchers
...
Ban `(except)`
2018-04-23 21:50:56 -05:00
Kodi Arfer
c1a487cdf7
Move logic from macroexpand_1 to macroexpand
...
By ending macro-expansion immediately when appropriate, this change fixes a bug arising from the fact that NaN != NaN.
2018-04-21 12:25:29 -07:00
Kodi Arfer
026316ebef
Refactor macroexpand_1
2018-04-21 12:25:29 -07:00
Kodi Arfer
116d7fa6ec
Copy in compile_atom instead of macroexpand_1
...
This copying is what keeps all the mutating code in the compiler methods (e.g., `expr.pop(0)`) from breaking cases in which Hy model objects are compiled more than once or inspected after compilation.
2018-04-21 12:25:29 -07:00
Kodi Arfer
4a6b633ad2
Add some missing imports
2018-04-21 12:25:29 -07:00
Kodi Arfer
1f95da2b0b
Avoid using a core function name as a variable
2018-04-21 12:25:29 -07:00
Kodi Arfer
a605936651
Remove &key
...
It's redundant with &optional.
2018-04-19 09:26:02 -07:00
Kodi Arfer
7bf2901364
Ban `(except)`
...
It's rarely useful, because it catches all exceptions, but it doesn't let you do anything other than return `None`. You can still get the same effect with `(except [])`.
2018-04-16 19:34:50 -07:00
Kodi Arfer
c93a60ede0
Remove support for cons cells
2018-04-12 16:45:17 -07:00
Simon Gomizelj
291847af15
Make HyKeyword constructor consistent
...
The colon is now only part of its string representation and no longer
accepted as part of the constructor:
:foobar == HyKeyword("foobar")
2018-04-07 22:29:20 -07:00
Simon Gomizelj
1b7dfd2839
Make HyKeyword a first class objects
...
HyKeywords are no longer an instances of string with a particular
prefix, but a completely separate object.
This means keywords no longer trip isinstance str checks, adding a
little bit of type safety to the compiler.
It also means that HyKeywords evaluate to themselves.
Closes #1352
2018-04-07 22:29:20 -07:00
Yigong Wang
564c030950
Raise LexException when codec can't decode some bytes
2018-04-07 11:47:06 -07:00
Simon Gomizelj
4d98cde663
Merge pull request #1560 from waigx/feat/results-shortcuts
...
Add recent REPL results globals *i and most recent error *e
2018-04-04 19:27:35 -04:00
Kodi Arfer
f17a21be63
Use `X` as the mangle delimiter on Python 3
2018-04-04 10:50:33 -07:00
Yigong Wang
be8537c0cf
Add recent REPL results globals *i and most recent error *e
...
This comment add *1, *2, *3 as globals for recent REPL results.
*e global is also added for the most recent error object.
2018-04-02 00:21:13 -04:00
Yigong Wang
4073c78069
Add -E support for Hy REPL
...
This commit adds -E support for Hy. Similar to Python, hy will ignore
all PYTHON* environment variables, e.g. PYTHONPATH and PYTHONHOME,
that might be set.
2018-03-31 15:16:40 -07:00
Simon Gomizelj
258a1f5748
Fix PY37 docstring generation
2018-03-31 03:07:26 -04:00
Simon Gomizelj
b27cdfed69
Fix `defclass` construction
...
Python Class AST expects a body which is a list of ast.Expr. Force
every entry to be stored as a statement. This means we'll preserve
print statements.
Python also doesn't construct docstrings in classes by setting a
__doc__ attribute, it does it by inspecting the first ast.Expr node of
the class. But this means we can remove the special handler for it.
2018-03-31 02:43:53 -04:00
Simon Gomizelj
84e1c65bcd
Improve checks inside `defclass`
...
We need to make sure we're looking at HyExpression when trying to
determine if we're rewriting an __init__ expression.
Fixes #1533
2018-03-31 02:43:53 -04:00
Simon Gomizelj
cf11e81c93
Remove unused imports
2018-03-31 02:43:53 -04:00
gilch
074a4bb75f
Merge pull request #1556 from waigx/chore/hy-help-msg
...
Prettify hy command helping message
2018-03-30 11:21:00 -06:00
Yigong Wang
5ae6875e88
Fix `mangle` for Pythons compiled with UCS-2
2018-03-30 07:23:32 -07:00
Yigong Wang
57064d38dd
Prettify hy command helping message
2018-03-29 23:04:22 -04:00
Tuukka Turto
af89fd68b0
Report objects when raising type error ( #1554 )
...
Give better error report when replacing non-hy objects
2018-03-28 21:45:49 -05:00
Simon Gomizelj
97cb19a8a2
Fix bytecode loading on Python 3.7
2018-03-24 12:34:43 -07:00
Kodi Arfer
03eab21fbf
Avoid a Python 3.7 deprecation warning
2018-03-24 12:34:43 -07:00
Kodi Arfer
e3058b5cf5
Handle module docstrings on Python 3.7
2018-03-24 12:34:43 -07:00
Kodi Arfer
dc30584a8a
Handle function docstrings on Python 3.7
2018-03-24 12:34:43 -07:00
gilch
e7b21cc0df
fix indent
2018-03-23 14:16:06 -07:00
Kodi Arfer
ad59fd7ff6
In -> and ->>, don't modify the arguments
2018-03-23 13:57:19 -07:00
Simon Gomizelj
c663d38e33
Add metaclass support, support PEP 3115 and PEP 487
2018-03-22 13:28:22 -07:00
Kodi Arfer
4c5dea0756
Use io.StringIO instead of the StringIO module
2018-03-13 14:57:31 -04:00
Kodi Arfer
6875ae0e3f
Replace `hyify` with `unmangle`
2018-03-13 14:56:49 -04:00
Kodi Arfer
3c97d2982c
Use `*1` instead of `_` for REPL history
...
`_`, as a variable, is now the shadow subtraction operator.
2018-03-13 14:56:47 -04:00
Kodi Arfer
85968e70dd
Add `mangle` and `unmangle` as core functions
2018-03-13 14:55:55 -04:00
Kodi Arfer
0c8c5dc830
Mangle special forms
2018-03-13 14:55:55 -04:00
Kodi Arfer
ccb3ba6092
Mangle macro names
2018-03-13 14:55:55 -04:00
Kodi Arfer
0c816f2e83
Mangle keyword arguments
2018-03-13 14:55:55 -04:00
Kodi Arfer
d252bb0e94
Mangle names that coincide with Python keywords
2018-03-13 14:55:55 -04:00
Kodi Arfer
52edad28e2
Overhaul mangling rules
2018-03-13 14:55:53 -04:00
Kodi Arfer
d501d4d806
Mangle symbols at compile-time instead of parse-time
...
This means that a HySymbol remembers its original name. That is, `a-b` and `a_b` are different symbols although `(setv a-b 1)` and `(setv a_b 1)` set the same variable (namely, `a_b`).
Most of the edits in this commit are to switch underscores to hyphens in places where mangling hasn't happened yet.
I removed some lexer tests since the lexer no longer does any mangling.
2018-03-13 14:55:15 -04:00
Kodi Arfer
7fcc7ac4b6
Make unary comparison ops evaluate their argument
2018-03-13 14:38:36 -04:00
Kodi Arfer
0574e275b5
Make hy-repr support some `collections` classes
2018-03-10 18:11:07 -08:00
Kodi Arfer
38f461890d
Make hy-repr support DateTime objects
2018-03-10 18:11:07 -08:00
Kodi Arfer
3dbe05302e
Make hy-repr support regex match objects
2018-03-10 18:11:07 -08:00
Kodi Arfer
f7ab9a6e7c
Make hy-repr support dictionary views
2018-03-10 18:11:07 -08:00
Kodi Arfer
90a09b5b44
Make hy-repr use double spaces for dictionaries
2018-03-10 18:11:07 -08:00
Kodi Arfer
83c4f63bc2
Reimplement hy-repr with registered functions
...
This removes a lot of hy-reprs that were hard-coded into the hy-repr function itself. It also allows you to add a hy-repr for an existing class without monkey-patching the class.
2018-03-10 18:11:07 -08:00
Simon Gomizelj
ef2f435647
Add a hy.introspect module to deal with getargspec deprecation
2018-02-14 16:05:31 -05:00
Simon Gomizelj
be6ddd4bb2
Fix deprecation warning triggered by PEP 479
2018-02-14 16:05:31 -05:00
Simon Gomizelj
316220b742
Fix AST generation of a naked return
2018-02-14 16:05:31 -05:00
Kodi Arfer
7cf23fabc4
Merge pull request #1503 from vodik/travis-py37
...
Add python 3.7-dev to travis, allow it to fail
2018-02-14 08:41:14 -08:00
Simon Gomizelj
a2c8f50b30
Implement changes to support PEP 552
2018-02-09 16:43:25 -05:00
Simon Gomizelj
5c40f793a1
Support PEP 328
...
Add support for proper relative imports
2018-02-06 23:41:12 -05:00
Tuukka Turto
5c720c0110
Merge pull request #1473 from Kodiologist/new-year-2018
...
Update copyright years
2018-02-05 15:11:59 +02:00
Tuukka Turto
cf87de5cc2
Merge pull request #1483 from vodik/remove-def
...
Just remove `def`
2018-01-31 08:54:59 +02:00
Simon Gomizelj
0cd4df3898
Remove def and standardize on setv
2018-01-21 00:25:33 -05:00
Tuukka Turto
a9621817f9
Merge pull request #1433 from Kodiologist/while-multistatement
...
Handle statements in the condition of `while`
2018-01-11 07:45:27 +02:00
Kodi Arfer
64cf7c7437
Merge pull request #1456 from Kodiologist/big-floats
...
Don't parse large floats as symbols
2018-01-11 00:44:50 -05:00
Kodi Arfer
6de7ddfee5
Update copyright years
2018-01-01 10:38:33 -05:00
Simon Gomizelj
f69ccd2421
Allow coroutines to be decorated
2017-12-31 09:03:39 -05:00
Kodi Arfer
b81585eaba
Reimplement _with and _for as functions
2017-12-30 19:39:15 -05:00
Simon Gomizelj
1e4ad3167b
Introduce for/a* and for/a expressions
2017-12-30 19:02:15 -05:00
Simon Gomizelj
783d53ecb7
Introduce with/a* and with/a expressions
2017-12-30 19:02:15 -05:00
Simon Gomizelj
2ffaa8e5be
Fix yield-from to prevent it from accepting no arguments
...
Closes #1472
2017-12-30 19:02:15 -05:00
Simon Gomizelj
e3e01d4405
Introduce fn/a and defn/a
...
Closes #1054
2017-12-30 19:02:15 -05:00
Jakub Wilk
8b986e87e3
Add missing space between words
2017-12-24 20:02:23 +01:00
Rob Day
eda78eb81c
Allow multiple expressions in a try
2017-12-03 09:47:41 +00:00
Jakub Wilk
e2e1b04ea3
Fix typos
2017-11-26 00:44:03 +01:00
Kodi Arfer
a26480a81b
Don't parse large floats as symbols
2017-11-11 15:14:28 -08:00
Kodi Arfer
52a0c8a870
Unify implementations of `eval-X-compile`
2017-11-02 08:43:43 -07:00
Kodi Arfer
fd64575799
Handle statements in the condition of `while`
2017-11-02 07:31:58 -07:00
Ryan Gonzalez
e0e664c030
Merge branch 'master' into letmacro
2017-11-01 09:39:18 -05:00
Kodi Arfer
a074bb9a5c
Work around an astor regression for NaN
2017-10-31 17:50:44 -07:00
gilch
6bb997dbea
update astor to 0.6
2017-10-31 14:13:41 -06:00
gilch
91bdaea535
add documentation macros
2017-10-30 21:25:25 -06:00
gilch
a4dd344ebd
protect eval-and-compile/eval-when-compile in let
2017-10-30 20:24:09 -06:00
gilch
82b4518fa6
error check defclass name
2017-10-30 20:24:09 -06:00
gilch
e90f082baf
back `let` with dict for better defclass behavior
2017-10-30 20:23:57 -06:00
gilch
3707681056
make deftag/defmacro macros, not special forms
2017-10-29 17:52:40 -06:00
Tuukka Turto
fac87c99d0
Merge pull request #1444 from gilch/xi-tag
...
change xi macro to #% tag macro
2017-10-29 21:34:56 +02:00
Tuukka Turto
268463c68d
Merge pull request #1432 from Kodiologist/else-detection
...
Don't treat [else…] or ("else"…) as else clauses
2017-10-29 21:21:32 +02:00
Tuukka Turto
fabc55a62a
Merge pull request #1431 from Kodiologist/repl-crash
...
Fix a crash in HyTypeError.__str__
2017-10-29 21:20:00 +02:00
gilch
497e929913
generalize #% to arbitrary expressions
2017-10-26 14:23:25 -06:00
gilch
b5f1136ba5
%* %** parameters for #% tag macro
2017-10-26 13:03:01 -06:00
gilch
f81fb771eb
change xi macro to #% tag macro
2017-10-26 12:55:48 -06:00
gilch
2319adcc7f
fix whitespace in anaphoric
2017-10-26 12:53:08 -06:00
ekaschalk
38375c6bf7
Standardize hy.core docstrings
2017-10-17 13:20:26 -07:00
gilch
c4b3d7bcda
fix gensym format to start with _ for import *
2017-09-23 23:41:37 -06:00
gilch
a54f6aa38b
add hidden &name parameter to macros
...
The module name allows macros to preexpand their body in the proper
context.
2017-09-23 14:59:43 -06:00
gilch
5bbf4d9894
fix premature binding in `let`
2017-09-22 20:07:48 -06:00
Kodi Arfer
1e456c6ced
Don't treat [else…] or ("else"…) as else clauses
2017-09-20 16:34:56 -07:00
Kodi Arfer
39785b4657
Fix a crash in HyTypeError.__str__
2017-09-20 10:40:52 -07:00
gilch
081a6e2575
factor out smacrolet from let
2017-09-18 23:01:13 -06:00
gilch
bcc93fb1fe
refactor let symbol expansion to a class
2017-09-18 21:01:42 -06:00
gilch
20b4342d40
support (global) in `let`
2017-09-18 14:54:08 -06:00
gilch
ba898aa8d8
support (nonlocal) in `let`
2017-09-18 13:51:32 -06:00
gilch
34038ff433
implement `let`
2017-09-18 12:21:42 -06:00
Ryan Gonzalez
db210929d0
Merge pull request #1360 from gilch/model-repr
...
proper reprs for Hy models
2017-09-18 08:45:28 -05:00
gilch
d38956fb9e
remove trailing commas in HyDict reprs
2017-09-18 01:03:00 -06:00
Rob Day
907e72681f
Let argument destructuring work with docstrings
2017-09-17 21:06:45 +01:00
Rob Day
5a6488e353
Treat _42 etc. as a variable name, not an integer
2017-09-16 16:12:29 -07:00
gilch
e43d6f5e2f
Merge pull request #1419 from rkday/else_multiple_statements
...
Allow multiple statements in the else branch of for
2017-09-16 14:10:28 -06:00
Rob Day
be35b09e5d
Allow multiple statements in the else branch of a for loop
2017-09-16 20:41:22 +01:00
Ryan Gonzalez
3f69ed8e8e
Merge pull request #1399 from Kodiologist/compiler-refactor
2017-09-15 14:44:32 -05:00
Ryan Gonzalez
44e5ded522
Merge pull request #1379 from Kodiologist/lua-str-literal
...
Add #[DELIM[ … ]DELIM] syntax for string literals
2017-09-15 14:36:08 -05:00
Rob Day
567fa14f1d
Allow else after a while loop
2017-09-14 20:55:29 +01:00
Kodi Arfer
957a721cd4
Remove _hy_anon_fn_N in favor of _hy_anon_var_N
2017-09-13 13:30:59 -07:00
Kodi Arfer
cf7ff802c9
Make hy.compiler.builds more flexible
...
I removed the "Hypster" error message and the test for it because it can only catch compiler bugs that should themselves be caught by Hy's tests.
2017-09-13 13:30:59 -07:00
Kodi Arfer
e30abcd20f
Combine some literal compilation methods
2017-09-13 13:30:59 -07:00
Kodi Arfer
5f36a53577
General compiler refactoring pass
...
Most of the changes are to use the new `asty` shorthand, but I also combined methods and statements when I saw obvious duplication.
2017-09-13 13:30:59 -07:00
Kodi Arfer
ddded5e8bd
PEP8 fixes in compiler
2017-09-13 13:30:59 -07:00
Kodi Arfer
deb801edab
Preserve .brackets in quoted HyStrings
2017-09-08 11:27:34 -07:00
Kodi Arfer
eb23ddc1e2
Add #[DELIM[ … ]DELIM] syntax for string literals
2017-09-08 11:27:34 -07:00
gilch
2d8a318e0c
color compound hy model reprs
2017-09-07 11:50:22 -07:00
gilch
021204af13
make HyCons __repr__ iterative
2017-09-07 11:50:22 -07:00
gilch
860431b2a5
make HyCons repr indented and multi-line
2017-09-07 11:50:22 -07:00
gilch
7674bf3267
proper reprs for Hy models
2017-09-07 11:50:16 -07:00
gilch
20516cce79
make native tests run on Windows too
2017-09-05 13:35:28 -06:00
Ryan Gonzalez
c69f8ebb79
Merge pull request #1404 from Kodiologist/unicode_literals
...
Simplify string parsing with `unicode_literals`
2017-08-29 18:22:02 -05:00
Kodi Arfer
e3e7fa8ce6
Catch exceptions raised by HyREPL.output_fn
2017-08-29 14:54:26 -07:00
Kodi Arfer
98fb33d0a3
Simplify string parsing with `unicode_literals`
...
I switched from `ast.literal_eval` back to `eval` because the former doesn't respect `unicode_literals`.
2017-08-28 10:28:19 -07:00
Kodi Arfer
0fc96306bc
Drop support for Python 3.3
2017-08-26 13:36:51 -07:00
Kodi Arfer
7ed31a18f3
Forbid arguments to `break` and `continue`
2017-08-26 11:37:15 -07:00
Kodi Arfer
2bbf886ceb
Make `assoc` a macro instead of a special form
...
The new macro evaluates its lvalue only once.
2017-08-25 11:41:28 -07:00
Ryan Gonzalez
dea99c8b76
Merge pull request #1354 from gilch/comment-discard
...
add #_ discard syntax
2017-08-19 11:29:57 -05:00
Kodi Arfer
8d40a68232
Initialize the return variable of `with`
2017-08-19 07:35:41 -07:00
Kodi Arfer
2ef9bc75d4
Clean up `with`
2017-08-19 07:25:00 -07:00
Kodi Arfer
21ea36f277
Add `return` as a special form
2017-08-11 13:56:44 -07:00
Kodi Arfer
cca8beea44
Fix the grammar of an error message
2017-08-11 10:49:32 -07:00
David Schaefer
969fa8d533
Fixes #1350 : try form in defmacro
2017-08-11 01:21:01 +02:00
David Schaefer
274f5e9002
Fix copy behaviour of HyComplex
2017-08-09 23:30:16 +02:00
Andrew Silva
c4f183f97c
Added docomplete truth check on hy/completer.py:27
...
Without the check, the next line will reference readline even if the
library was not successfully loaded.
2017-08-07 13:25:58 -04:00
Jordan Danford
c67b8bccb9
Expose `read`, `read_str`, and `eval` in Python
...
- Expose `read`, `read_str`, and `eval` in Python
- Add string evaluation example to interop section of docs
- Add test for `eval`
- Explain `eof` keyword argument in `read` docstring
2017-08-05 17:29:15 -07:00
David Schaefer
432d560310
No TypeError from multi-arity defn returning None
2017-08-04 17:08:41 +02:00
gilch
d0530b0e7e
add comment macro
2017-08-03 19:05:38 -06:00
Kodi Arfer
e8ffd41202
Merge pull request #1349 from woodrush/fix-unquote-splice-none
...
Allow `unquote-splice` to accept any false value as empty
2017-08-02 19:50:47 -04:00
gilch
203965d0fa
add #_ discard syntax
2017-08-02 16:55:14 -06:00
Kodi Arfer
ecc974de1e
Implement Python 2 `exec`
...
The implementation of `hy.core.language.exec` draws code from the `exec_` function in commit f574c7be6ebc80041ef58ca29588f310248ebed4 of the library Six, which is copyright 2010–2017 Benjamin Peterson and licensed under the Expat license.
2017-08-02 13:33:59 -04:00
Hikaru Ikuta
a0224ef8bd
Allow `unquote-splice` to accept any false value as empty
2017-08-02 00:50:37 +09:00
Kodi Arfer
2d20a52379
Don't use `cond` in the definition of a core macro
...
`cond` itself is a core macro.
2017-07-28 16:58:45 -07:00
gilch
d9a5acbcc9
Merge pull request #1343 from Kodiologist/repl-history-after-exception
...
Save REPL history after an exception
2017-07-26 22:39:30 -06:00
Kodi Arfer
67a4815024
Shadow `get` ( #1344 )
2017-07-26 21:10:54 -05:00
Kodi Arfer
2f340f8049
Save REPL history after an exception
2017-07-26 14:26:45 -07:00
gilch
0a14410911
Merge pull request #1337 from Kodiologist/shetag
...
Don't try to lex tag-macro calls as shebangs
2017-07-25 12:43:53 -06:00
Kodi Arfer
28ce83524b
Don't try to lex tag-macro calls as shebangs
2017-07-23 11:43:19 -07:00
Kodi Arfer
eea8cf1061
hy-repr: Fix a crash when given a NumPy array
2017-07-20 08:46:42 -07:00
Kodi Arfer
7b94c45e16
Remove an extra parenthesis in hy.contrib.profile
2017-07-20 08:46:37 -07:00
Kodi Arfer
0bbb5f8e34
hy-repr: Support #* and #**
2017-07-19 10:25:24 -07:00
Kodi Arfer
784a44601b
Remove the implementation of `apply`
2017-07-19 10:18:55 -07:00
Kodi Arfer
75e4ad8304
Remove uses of `apply` from /hy
2017-07-17 13:34:42 -07:00
Kodi Arfer
2d863abc85
Implement #* and #** unpacking
2017-07-17 13:34:39 -07:00
Kodi Arfer
801836f6c2
Remove the Python 2 yield-from macro
...
I moved the yield-from tests from native_macros to py3_only_tests.
2017-07-13 08:46:41 -07:00
Kodi Arfer
a979dd85f7
Don't make `yield-from` a special form on Python 2
2017-07-13 08:46:41 -07:00
Tuukka Turto
678998f00c
Merge pull request #1321 from Kodiologist/no-str-as-sym
...
Require HySymbols instead of HyStrings in more cases
2017-07-12 22:11:36 +03:00
Ryan Gonzalez
467b300e6c
Remove an outdated comment
2017-07-12 13:56:17 -05:00
Kodi Arfer
b7657e8fa3
Require HySymbols instead of HyStrings more often
2017-07-12 10:57:35 -07:00
Kodi Arfer
5a1e6a7c6a
hy-repr: Support NaN and Inf
2017-07-10 08:50:49 -07:00
Kodi Arfer
bb91b57dca
Require capitalizing NaN and Inf like so
2017-07-10 08:50:49 -07:00
Kodi Arfer
850ba03d1f
Slightly simplify HyREPL
2017-07-03 17:01:12 -07:00
Kodi Arfer
6db3da779e
Don't wrap values while expanding macros
...
This is the compiler's job now.
2017-07-03 17:01:12 -07:00
Kodi Arfer
55986b2033
Auto-promote values to HyObjects in the compiler
2017-07-03 17:01:12 -07:00
Kodi Arfer
4be37b358b
Make lists no longer magical for the compiler
2017-07-03 17:01:12 -07:00
Kodi Arfer
f55fcf43bd
Add a docstring for hy-eval
...
It's just a copy of the documentation for hy.core.langauge.eval.
2017-07-03 17:01:12 -07:00
Kodi Arfer
ca95194240
Change `eval` from a special form to a function
2017-06-27 08:14:29 -06:00
Kodi Arfer
f2278cf2f0
Support PYTHONDONTWRITEBYTECODE
2017-06-26 19:00:08 -06:00
Kodi Arfer
26d1b3f72e
Don't parse 5.attr or :foo.attr as symbols
2017-06-23 08:30:37 -07:00
gilch
6cd3201421
rename sharp macros to tag macros
2017-06-22 22:48:46 -06:00
gilch
20c26a52e4
make sharp macros take arbitrary identifiers
...
Previously, only a single character was allowed.
2017-06-22 22:46:24 -06:00
neil-lindquist
d3df17d9d8
Modify cond to support single argument branches
2017-06-10 08:30:53 -07:00
Kodi Arfer
5bf9ecfc5a
Forbid (try) and (try BODY)
2017-05-25 20:48:09 -05:00
Kodi Arfer
dffa2811e6
Return from the `else` clause of a `try` form
...
I overhauled the documentation of `try` while I was editing it.
2017-05-25 20:48:09 -05:00
Kodi Arfer
81d89c9d12
Enforce the standard order of `try` elements
2017-05-25 20:48:09 -05:00
Kodi Arfer
0d2749d5cd
Minor cleanup in hy.compiler: try, except
2017-05-25 20:48:09 -05:00
Kodi Arfer
2eb81864df
Make all files comply with license-header policy
2017-04-27 14:16:57 -07:00
Kodi Arfer
d3fa375052
Migrate from Nose to pytest
2017-04-26 14:00:11 -07:00
Kodi Arfer
ec0902b649
Set __file__ of bytecode imports
2017-04-25 09:30:13 -07:00
Kodi Arfer
a27d737e1c
Drop support for Pythons 3 older than 3.3
2017-04-24 14:22:13 -07:00