Expand description
RML — Interactive REPL (issue #29)
Maintains a persistent Env between user inputs and prints diagnostics
inline. Meta-commands start with ::
:help show this help message
:reset discard all state and start a fresh Env
:env print declared terms / assignments / types / lambdas
:load <file> evaluate a `.lino` file in the current Env
:save <file> write the session transcript (as `.lino`) to <file>
:quit exit the REPL (also :exit, Ctrl-D)Tab-completion is best-effort: the Repl::completion_candidates helper
returns known meta-commands plus declared terms, operators, and lambda
names. The CLI driver (main.rs) wires it into the line-editor.
Structs§
- Repl
- REPL state. Owns the persistent
Envand the running transcript so:savecan replay the session. - Repl
Step - Outcome of feeding a single line into the REPL. Output and error are
stringified for the driver to emit;
exitrequests termination.
Functions§
- format_
env - Render a snapshot of the env’s user-visible state for
:env. - run_
repl - Drive the REPL on the given input/output streams. Used by
main.rs. Suppresses prompts when stdin is not a TTY so piped input stays clean.