Commit Graph

530 Commits

Author SHA1 Message Date
Brandon T. Willard
e468d5f081 Refactor REPL error handling and filter Hy internal trace output
These changes make the Hy REPL more closely follow `code.InteractiveConsole`'s
class interface and provide minimally intrusive traceback print-out filtering
via a context manager that temporarily alters `sys.excepthook`.  In other words,
exception messages from the REPL will no longer show Hy internal
code (e.g. importer, compiler and parsing functions).

The boolean variable `hy.errors._hy_filter_internal_errors` dynamically
enables/disables trace filtering, and the env variable
`HY_FILTER_INTERNAL_ERRORS` can be used as the initial value.
2019-02-07 13:43:58 -05:00
edouardklein
7d72e2fe74 Correct documentation of earmuff behavior
Another piece of fix #1714
2019-02-05 13:20:20 -05:00
Eli
e4fd74af1b Clarifying &optional documentation (fixes #1722) 2019-01-20 17:11:52 -05:00
Eli
3d2be62d4b Add synonyms for argument unpacking, for text-search purposes 2019-01-19 13:33:54 -05:00
Kodi Arfer
70747a58c3 Fix an example in interop.rst 2018-12-29 19:57:18 -05:00
Brandon T. Willard
690416b3d6 Update description of eval in core.rst 2018-11-28 17:08:10 -06:00
Brandon T. Willard
87a5b117a1 Implement new importer using PEP-302 semantics
Python 3.x is patched in a way that integrates `.hy` source files into
Pythons default `importlib` machinery.  In Python 2.7, a PEP-302 "importer"
and "loader" is implemented according to the standard `import` logic (via
`pkgutil` and later pure-Python `imp` package code).

In both cases, the entry-point for the loaders is through `sys.path_hooks` only.
As well, the import semantics have been updated all throughout to utilize
`importlib` and follow aspects of PEP-420.  This, along with some light
patches, should allow for basic use of `runpy`, `py_compile` and `reload`.

In all cases, if a `.hy` file is shadowed by a `.py`, Hy will silently use
`.hy`.
2018-08-25 22:50:38 -05:00
Kodi Arfer
45e99d027d Fix an intersphinx link 2018-07-24 09:31:36 -07:00
Kodi Arfer
1d2c73165d Make HyKeyword callable
Co-authored-by: Simon Gomizelj <simon@vodik.xyz>
2018-07-24 09:19:37 -07:00
Kodi Arfer
e05af9d7e0 Document function docstrings 2018-07-11 11:59:46 -07:00
Kodi Arfer
9859b0085c Document the required order of &-parameters 2018-07-11 11:36:32 -07:00
Kodi Arfer
9cc90362d0 Docs: string literal prefixes must be in lowercase 2018-07-11 11:24:19 -07:00
Kodi Arfer
da754c0e5d Update NEWS and docs for the new comprehensions 2018-06-13 17:31:08 -07:00
Kodi Arfer
8296a36e12 Add tests and docs for model patterns 2018-05-28 16:15:47 -07:00
Kodi Arfer
38fdcc2114 Don't let HySymbol inherit from HyString 2018-05-20 14:11:35 -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
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
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
Kodi Arfer
a605936651 Remove &key
It's redundant with &optional.
2018-04-19 09:26:02 -07:00
Kodi Arfer
bbf669d407 Update docs and NEWS for HyCons removal 2018-04-12 16:45:17 -07:00
Simon Gomizelj
69202df23d Update documentation and add a NEW entry 2018-04-07 22:29:20 -07:00
Kodi Arfer
474de9e4c3 Fix a typo in the mangling documentation 2018-04-04 10:51:03 -07:00
Kodi Arfer
f17a21be63 Use X as the mangle delimiter on Python 3 2018-04-04 10:50:33 -07:00
Yigong Wang
e0d37d63f7 Code review feedback 2018-03-26 22:47:12 -04:00
Yigong Wang
950c1973e4 Add hy --spy in quickstart 2018-03-26 21:07:52 -04:00
Kodi Arfer
eda0b89f67 Document mangling 2018-03-13 14:56:49 -04:00
Kodi Arfer
4d77dd0d40 Spin off syntax documentation from api.rst 2018-03-13 14:56:49 -04:00
Kodi Arfer
8c00ab66f9 NEWS and docs for hy-repr 2018-03-10 18:11:07 -08:00
Jakub Wilk
d1cb630698 Fix typos 2018-02-15 16:35:33 +01: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
Jakub Wilk
b8b64d42bd docs/conf.py: make regexp string raw
Fixes:

    conf.py:12: DeprecationWarning: invalid escape sequence \Z

when building docs using Python 3.6 with warnings enabled.
2018-01-08 23:19:08 +01:00
Jakub Wilk
03cd437f01 Fix typo 2018-01-08 22:45:00 +01:00
Simon Gomizelj
c5231bc242 Document defn/a, fn/a, for/a, with/a 2017-12-31 09:02:46 -05:00
Yoan Tournade
52292da695
Update interop doc: print function is lower-case
(A typo made use of Print function, which is not defined)
2017-12-09 23:12:19 +01:00
Rob Day
76bbf05812 Update documentation to cover new 'try' body rules 2017-12-03 09:47:41 +00:00
Jakub Wilk
e2e1b04ea3 Fix typos 2017-11-26 00:44:03 +01:00
Kodi Arfer
1b3fc81f3f Document eval-X-compile 2017-11-02 08:43:43 -07:00
Kodi Arfer
ed0b273551 Fix a bug in docs/conf.py
Without the trailing slash, `py = ('https://docs.python.org/3', None)` mysteriously creates links to the Python 2 documentation rather than Python 3.
2017-11-02 07:32:03 -07:00
Kodi Arfer
b25a69179f Update the documentation of while 2017-11-02 07:32:03 -07:00
Ryan Gonzalez
e0e664c030
Merge branch 'master' into letmacro 2017-11-01 09:39:18 -05:00
gilch
91bdaea535 add documentation macros 2017-10-30 21:25:25 -06:00
gilch
e90f082baf back let with dict for better defclass behavior 2017-10-30 20:23:57 -06: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
d2e8537d3f document let 2017-09-23 15:00:00 -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