pub enum ProcessModuleOutcome {
Ok {
file: ProcessedFile,
imports: Vec<String>,
},
MissingImports {
file: ProcessedFile,
imports: Vec<String>,
missing: Vec<String>,
},
HeaderParseFailed {
diagnostics: LeanElabFailure,
},
Unsupported,
}Expand description
Outcome of crate::LeanSession::process_module_with_info_tree.
The Lean shim parses the header first (via Lean.Parser.parseHeader)
and only runs IO.processCommands if the header parsed cleanly.
Ok / MissingImports therefore both carry a populated
ProcessedFile (its diagnostics field captures any elaboration
failure of the body); HeaderParseFailed short-circuits with just
the parser’s diagnostics.
Variants§
Ok
Header parsed; every parsed import is present in the session’s
open env; the body was processed. imports lists the
user-written modules (Lean’s auto-inserted Init is filtered
out by the shim).
Fields
file: ProcessedFileBody projection. file.diagnostics still records any
per-command elaboration errors the body produced.
MissingImports
Header parsed but some imports name modules the session’s open
env does not have. The body was still processed against the
available env — file is populated and the partial projection
is useful diagnostic data. Callers typically surface missing
as a warning.
Fields
file: ProcessedFileBody projection (partial if some declarations depended on the missing modules).
HeaderParseFailed
Lean.Parser.parseHeader reported error-severity messages.
IO.processCommands was not invoked; only the header
diagnostics are returned.
Fields
diagnostics: LeanElabFailureHeader-parser diagnostics, with the same byte-budget
semantics as
crate::host::evidence::LeanKernelOutcome::Rejected.
Unsupported
The capability dylib does not export the
lean_rs_host_process_module_with_info_tree shim. No FFI call was
made.
Trait Implementations§
Source§impl Debug for ProcessModuleOutcome
impl Debug for ProcessModuleOutcome
Source§impl<'lean> TryFromLean<'lean> for ProcessModuleOutcome
impl<'lean> TryFromLean<'lean> for ProcessModuleOutcome
Source§fn try_from_lean(obj: Obj<'lean>) -> LeanResult<Self>
fn try_from_lean(obj: Obj<'lean>) -> LeanResult<Self>
obj into Self, returning a
LeanError::Host with stage
[HostStage::Conversion] if the object’s kind or payload is
outside the type’s representable range. Read more