Expand description
IO-result helpers — mirrors lean.h:2893–2907.
IO α results from compiled Lean are encoded as constructors with tag 0
(ok) or tag 1 (error). The single object payload sits in constructor
slot 0; reading it requires the ctor accessors implemented against
LeanCtorObjectRepr.
Functions§
- lean_
io_ ⚠mark_ end_ initialization - Signal that runtime initialization is complete; subsequent allocations
should not flag objects as persistent (
lean.h:2907). - lean_
io_ ⚠result_ get_ error - Borrow the error out of an
IO.errorresult (lean.h:2896). - lean_
io_ ⚠result_ get_ value - Borrow the value out of an
IO.okresult (lean.h:2895). - lean_
io_ ⚠result_ is_ error - True if
ris anIO.errorresult (lean.h:2894). - lean_
io_ ⚠result_ is_ ok - True if
ris anIO.okresult (lean.h:2893). - lean_
io_ ⚠result_ take_ value - Take ownership of the value out of an
IO.okresult (lean.h:2898–2903).