Kodi Arfer
16ec46a473
Update docstring handling for Python 3.7
...
See https://github.com/python/cpython/pull/7121 .
2018-06-05 17:35:48 -07:00
Kodi Arfer
bc2a5a2747
Don't test on Travis's outdated Python 3.7
...
See https://github.com/travis-ci/travis-ci/issues/9069 .
2018-06-05 17:32:48 -07:00
Kodi Arfer
3e943209fe
Merge pull request #1616 from Kodiologist/autopromotion-update
...
Streamline auto-promotion and position spoofing
2018-06-05 10:29:57 -07:00
Kodi Arfer
74bf3e9e81
Work around a scoping bug in multi.defn ( #1630 )
2018-06-05 10:23:32 -07:00
Kodi Arfer
3204a9e8a3
Streamline auto-promotion and position spoofing
...
Auto-promotion now occurs in only two cases: when we start the compiler and when we expand a macro. It's fully recursive so even a non-model nested in a model will be promoted.
This change fixes some regressions induced by the stricter type checks of the pattern-matching compiler.
2018-06-05 09:23:21 -07:00
Kodi Arfer
aae1f8718c
Merge pull request #1613 from Kodiologist/modname-mangle-bug
...
Fix a regression with mangling module names
2018-06-03 15:44:40 -07:00
Kodi Arfer
a38c948ed2
Fix a regression with mangling module names
2018-06-03 15:38:49 -07:00
Kodi Arfer
d16a0bb395
Merge pull request #1608 from Kodiologist/astor-update
...
Re-enable tests that were stymied by an astor bug
2018-05-29 09:27:03 -07:00
Kodi Arfer
6458f2d66f
Re-enable tests that were stymied by an astor bug
2018-05-29 09:18:42 -07:00
Ryan Gonzalez
e66743c976
Merge pull request #1615 from Kodiologist/no-parser-cache
...
Disable the parser cache
2018-05-27 16:28:00 -05:00
Ryan Gonzalez
e9e27c7a4f
Merge pull request #1619 from Kodiologist/stdlib-fix
...
Fix the management of _stdlib
2018-05-27 16:26:57 -05:00
Kodi Arfer
81035878dd
Bump rply version
2018-05-26 09:33:06 -07:00
Kodi Arfer
e344ac1fd6
Fix the management of _stdlib
...
_stdlib is a global variable, so core modules could use it, contrary to our intention, so long as they happened to be compiled after a non-core module. I've added a compiler attribute to track whether we can use _stdlib.
This fix exposed some cases where hy.core.shadow tried to use a core function, so I fixed those.
I've also added an `if not _stdlib` to `load_stdlib` so that we only bother to actually load _stdlib once.
2018-05-24 17:51:21 -07:00
Kodi Arfer
1732ddec4d
Disable the parser cache
...
I wasn't able to observe a meaningful performance improvement from it, and it requires some file I/O. Here are the times, in seconds, I observed on my ThinkPad T450s with Python 3.6 and Ubuntu 18.04:
test 1 test 2
master 8.96 2.59
this change 8.88 2.62
Test 1 is the total time from:
$ time dash -c 'git clean -dfx && pip install -e . && pytest --ignore tests/test_bin.py'
Test 2 is pytest's reported total time from a subsequent:
$ pytest --ignore tests/test_bin.py
2018-05-21 09:22:49 -07:00
Kodi Arfer
370563567a
Merge pull request #1593 from Kodiologist/compiler-pattern-matching
...
Pattern-matching compiler
2018-05-20 14:24:24 -07:00
Kodi Arfer
9f454f0228
Test complex numbers in test_hy2py
2018-05-20 14:11:35 -07:00
Kodi Arfer
0a5bc21fcf
Simplify compile_numeric_literal for new astor
2018-05-20 14:11:35 -07:00
Kodi Arfer
906b470499
Move test assertions into a test function
2018-05-20 14:11:35 -07:00
Kodi Arfer
38fdcc2114
Don't let HySymbol inherit from HyString
2018-05-20 14:11:35 -07:00
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
Kodi Arfer
b4185e7665
Merge pull request #1606 from pyx/fix-1605
...
Fixes #1605 : remove macros ap-pipe and ap-compose
2018-05-20 13:53:40 -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
Kodi Arfer
6db03ab3b6
Merge pull request #1603 from gilch/let-handle-dot
...
Fix bug in let's handle-dot.
2018-05-18 10:47:08 -07:00
gilch
049c78f5d5
Fix bug in let's handle-dot.
2018-05-18 10:40:59 -07:00
Kodi Arfer
60c0f60a32
Merge pull request #1609 from pyx/fix-doc-typo
...
Documentation improvement
2018-05-16 15:22:59 -07:00
Philip Xu
0b08916174
Fix typos and improve code examples
2018-05-16 18:25:53 -04:00
Philip Xu
643196c2b8
Remove mixtures of tabs and spaces
2018-05-15 23:29:07 -04:00
Ryan Gonzalez
eec4a178b8
Merge pull request #1604 from hylang/fix-bots
...
fix botsbuildbots for #1582
2018-05-06 21:18:31 -05: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
Kodi Arfer
7a80aa92be
Merge pull request #1590 from Kodiologist/no-lambda-unpacking
...
Remove tuple unpacking in lambda lists
2018-05-04 11:11:06 -07: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
Kodi Arfer
bb10921ace
Merge pull request #1579 from vodik/splicing-typo
...
Fix a bug where the compiler doesn't properly handle unquote-splice
2018-04-30 09:46:42 -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
7e1b890d7c
Merge pull request #1586 from Kodiologist/multi-expr-try
...
Fix a bug that caused `try` to drop expressions
2018-04-30 09:24:24 -07:00
Kodi Arfer
c7ac4c60c4
Fix a bug that caused try
to drop expressions
2018-04-30 09:18:01 -07:00
Kodi Arfer
51416424e2
Merge pull request #1585 from Kodiologist/empty-bodies
...
Allow `while` and `for` with empty bodies
2018-04-29 20:05:08 -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
1eccd10d24
Merge pull request #1583 from Kodiologist/update-test_preprocessor_exceptions
...
Update test_preprocessor_exceptions
2018-04-29 19:50:30 -07:00