hissp package#

Submodules#

Module contents#

It’s Python with a Lissp.

See the GitHub project for complete documentation and tests.

https://github.com/gilch/hissp

__init__.py defines a few functions meant for use as fully-qualified tags and imports several utilities for convenience, including,

as well as the hissp.macros._macro_ namespace, making all the bundled macros available with the shorter hissp.._macro_ qualifier.

hissp.prelude(env)[source]#

Lissp prelude shorthand tag.

Usage: hissp..prelude#env, which expands to

(hissp.macros.._macro_.prelude env)

(A || or : argument makes exec default to the global env.)

See hissp.macros._macro_.prelude.

hissp.alias(abbreviation, qualifier)[source]#

Lissp alias shorthand tag.

Usage: hissp..alias## abbreviation qualifier, which expands to

(hissp.macros.._macro_.alias abbreviation qualifier)

See hissp.macros._macro_.alias.

hissp.refresh(module_name)[source]#

REPL convenience tag to recompile and reload a module.

Usage: hissp..refresh#'foo where foo is the __name__.

An empty argument (|| or :) means the current module.

There must be a corresponding .lissp file present to recompile.

Refreshing the main module (which would have side effects) is not supported. Send the REPL updated top-level definitions individually, or restart the REPL instead. (A corresponding compiled Python file is not required for a .lissp file run as the main module.)

While potentially confusing, Python can import the .py file used as main again using its name. These are considered separate modules by the runtime.

See also: subrepl, hissp.reader.transpile, importlib.reload.

hissp.subrepl(module)[source]#

Convenience tag to start a Lissp subREPL in the given module.

Usage: hissp..subrepl#foo. where foo. evaluates to a module.

Won’t re-enter current module. Prints __name__ on subREPL exit. (Exit a subREPL using EOF.)

See also: refresh, hissp.repl.interact, REPL.