hissp package#
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,
from
hissp.compiler:from
hissp.munger:from
hissp.reader:
as well as the hissp.macros._macro_ namespace, making all the bundled
macros available with the shorter hissp. qualifier.
- hissp.refresh(module_name)[source]#
REPLconveniencetagto recompile and reload a module.Usage:
hissp..refresh#'foowherefoois the__name__.An empty argument (
||or:) means the current module.There must be a corresponding
.lisspfile 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
.lisspfile 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
tagto start a Lissp subREPL in the given module.Usage:
hissp..subrepl#foo.wherefoo.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.
- hissp.apropos(term: str, startswith: str = '') Iterator[str][source]#
Scans
dirof all imported modules and their classes forterm.>>> 'hissp..apropos' in apropos('apropos') True
The resulting symbols are qualified in Hisspâs import format, with modules names ending in a period.
Get help for a symbol:
>>> help(next(apropos('apropos'))) Help on function apropos in hissp.: hissp..apropos = apropos(term: str, startswith: str = '') -> Iterator[str] Scans `dir` of all imported modules and their classes for ``term``. ...
Print symbols:
>>> for s in apropos(munge('*'), 'hissp.'): print(demunge(s)) hissp.macros.._macro_.any*map hissp.macros.._macro_.let*call hissp.macros.._macro_.throw* hissp.._macro_.any*map hissp.._macro_.let*call hissp.._macro_.throw*
List symbols:
>>> [*apropos('Star_', 'hissp.._')] ['hissp.._macro_.anyStar_map', 'hissp.._macro_.letStar_call', 'hissp.._macro_.throwStar_']
Modules themselves are included:
>>> 'hissp.' in apropos('') True
Submodules#
- hissp.__main__ module
- hissp.macros module
- _macro_
At_()At_Hash_()At_sHash_()BHash_()Bang_Hash_()Bang_sHash_()Colon_Hash_()Dash_Gt_()Dash_Lt_Gt_Gt_()Et_Hash_()Fsol_Hash_()Fsol_XYHash_()HHash_()Hash_()Lsqb_Hash_()Lt_Hash_()MHash_()OHash_()Pcent_()QHash_()XHash_()XYHash_()XYZHash_()XYZWHash_()alias()ands()anyStar_map()any___map()assure()attach()avow()bHash_()binding()bnHash_()case()chainHash_()colHash_()cond()cxlHash_()cxvHash_()define()defmacro()defonce()deftupleonce()deftypeonce()defun()defvar()destruct___Gt_()doto()dtHash_()enHash_()fiHash_()ftHash_()fun()hshHash_()iHash_()if___else()impHash_()impStop_rHash_()instHash_()let()letStar_call()let___again()let___call()mix()mkHash_()mpHash_()mpStop_smHash_()myHash_()nilHash_()nspHash_()opHash_()ors()plHash_()posHash_()prelude()prog1()progn()proxyHash_()sentinelHash_()setAt_()setBang_()setLsqb_Hash_()spHash_()spyHash_()tbHash_()tfHash_()thrHash_()throw()throwStar_()throw___from()timeHash_()twHash_()unless()utHash_()uuidHash_()when()wrnHash_()zapAt_()zapBang_()zapLsqb_Hash_()
- _macro_
- hissp.compiler module
ENVMAX_PROTOCOLmacro_context()CompileErrorPostCompileWarningCompilerCompiler.new_env()Compiler.compile()Compiler.compile_form()Compiler.tuple_()Compiler.special()Compiler.lambda_()Compiler.parameters()Compiler.body()Compiler.invocation()Compiler.expand_macro()Compiler.get_macro()Compiler.call()Compiler.fragment()Compiler.qualified_identifier()Compiler.module_identifier()Compiler.atomic()Compiler.pickle()Compiler.linenos()Compiler.eval()
readerless()evaluate()execute()is_str()is_node()dequote()delambda()is_symbol()is_import()is_control()macroexpand1()macroexpand()macroexpand_all()parse_params()
- hissp.munger module
- hissp.reader module
- hissp.repl module