Skip to main content

Module session

Module session 

Source
Expand description

The session object (docs/tooling/02_repl.md §1) — a port of the reference implementation’s session.ts: a universe — the modules loaded from an entry file, their texts taken as a snapshot — plus an operation log (bindings, document edits, session declarations, reloads). The state is the universe with the log applied, recomputed deterministically from the snapshot, which is what makes :undo exact and a scripted session reproducible. The REPL (repl.rs) drives it; nothing here prints, and every answer is the same checker, inference, and engine the command line runs.

Structs§

Document
the document a root is built from, as the session holds it
ExprResult
RootInfo
Run
Session
SessionError
Timing

Enums§

BindSource
EditKind
Mode
Op
Origin

Constants§

SCRATCH

Functions§

doc_json
expr_text
an expression’s text, for chains and simple forms (the trace view)
fmt_diag
full_recompute
full recomputation on every question (the harness’s cross-check)
is_root_diag
op_text
parse_decl
parse one module-level declaration; returns it with its name
parse_expr
parse one expression: the text is wrapped in a constant declaration
pretty_json
canonical JSON, re-indented (numbers and strings untouched)

Type Aliases§

SResult