Module runner

Module runner 

Source
Expand description

The interactive REPL loop and file/expression runners.

Functions§

banner_purple
Banner shown when entering the Purple REPL (default narju).
banner_raw
Banner shown when entering the raw λ↑↓ REPL (narju --raw).
eval_str
Evaluate every form in src (the CLI’s -e flag), printing each result. Returns false on the first error, after printing it to stderr.
load_file
Read and evaluate every form in the file at path, printing each result unless silent. Returns false on the first read, parse, or evaluation error, after printing it to stderr — the CLI turns that into a nonzero exit.
make_prompt
The REPL prompt for a given tower level: plain at level 0, with the level in brackets inside a run at level > 0.
run_repl
The raw λ↑↓ read-eval-print loop.