Hy fork
Go to file
Brandon T. Willard 010986e8ca Implement minimal macro namespacing and add tests
This commit adds just enough namespacing to resolve a macro first in the macro's
defining module's namespace (i.e. the module assigned to the `HyASTCompiler`),
then in the namespace/module it's evaluated in.  Namespacing is accomplished by
adding a `module` attribute to `HySymbol`, so that `HyExpression`s can be
checked for this definition namespace attribute and their car symbol resolved
per the above.

As well, a couple tests have been added that cover
- the loading of module-level macros
  - e.g. that only macros defined in the `require`d module are added
- the AST generated for `require`
  - using macros loaded from modules imported via bytecode
- the non-local macro namespace resolution described above
  - a `require`d macro that uses a macro `require` exclusively in its
    module-level namespace
- and that (second-degree `require`d) macros can reference variables within
  their module-level namespaces.

Closes hylang/hy#1268, closes hylang/hy#1650, closes hylang/hy#1416.
2018-11-08 22:57:17 -06:00
bin Make hy2py public. 2014-04-30 01:51:21 +03:00
docs Implement new importer using PEP-302 semantics 2018-08-25 22:50:38 -05:00
hy Implement minimal macro namespacing and add tests 2018-11-08 22:57:17 -06:00
scripts Remove the obsolete reformat-changelog script 2018-02-13 15:32:40 -08:00
tests Implement minimal macro namespacing and add tests 2018-11-08 22:57:17 -06:00
.dockerignore Add initial .dockerignore file 2014-10-06 13:37:51 -06:00
.gitignore Update .gitignore to exclude pytest cache folder 2018-03-31 23:54:44 -04:00
.mailmap added new mail 2014-09-08 14:56:04 +02:00
.travis.yml Depend on astor 0.7 2018-07-21 11:20:10 -07:00
AUTHORS Include macroexpand-all changes in AUTHORS and NEWS 2018-07-25 17:22:40 -05:00
conftest.py Fix pytest hook so that ignore works consistently 2018-08-26 00:27:36 -05:00
CONTRIBUTING.rst Policy: allow PRs to be merged more easily 2018-02-24 10:04:56 -08:00
Dockerfile update my email 2014-11-22 10:28:31 -05:00
fastentrypoints.py Use fastentrypoints 2018-08-18 18:05:40 -04:00
get_version.py Remove the documentation's dependency on Hy itself 2017-05-23 11:28:28 -07:00
issue_template.md Point out appropriate help forums 2018-07-31 20:51:04 -06:00
LICENSE Update copyright years 2018-01-01 10:38:33 -05:00
make.bat Migrate from Nose to pytest 2017-04-26 14:00:11 -07:00
Makefile Drop --allow-all-external, deprecated by PEP 470 2018-02-14 16:05:31 -05:00
MANIFEST.in Convert NEWS to reStructuredText 2018-02-13 15:31:52 -08:00
NEWS.rst Updated NEWS 2018-09-11 16:26:21 -04:00
README.md Remove obsolete shields in README 2018-03-06 11:50:17 -08:00
requirements-dev.txt Require a sufficiently recent version of pytest 2017-08-26 21:57:43 -07:00
requirements-travis.txt Require a sufficiently recent version of pytest 2017-08-26 21:57:43 -07:00
setup.cfg Fix discovery of tests with mangled names 2018-06-11 21:05:29 -07:00
setup.py Use fastentrypoints 2018-08-18 18:05:40 -04:00
tox.ini Add posargs to tox test runner 2018-02-14 16:05:31 -05:00

Hy

Build Status Version

XKCD #224

Lisp and Python should love each other. Let's make it happen. Try it.

Hylarious Hacks

OK, so, why?

Well. Python is awesome. So awesome, that we have so many tools to alter the language in a core way, but we never use them.

Why?

Well, I wrote Hy to help people realize one thing about Python:

It's really awesome.

Oh, and lisps are neat.

Cuddles the Hacker

(fan art from the one and only doctormo)

Project