Tools for extracting Exprs from MessageData nodes #
This file provides for (ppCtx, e) in msg.exprs do notation, which iterates through the
expressions e in a msg : MessageData. The surrounding monad must support BaseIO to handle
.ofLazy MessageData nodes. e may be interpreted in a MetaM context using ppCtx.runMetaM e.
Some helpers are provided implemented in terms of this.
Iterate over all the expressions in a MessageData. Used to implement
for (ppCtx, e) in msg.exprs do notation, which should be preferred over using this declaration
directly.
Equations
- msg.forExprsIn s f = do let __do_lift ← Lean.MessageData.forExprsIn.go✝ f { currNamespace := Lean.Name.anonymous, openDecls := [] } none s msg pure __do_lift.value
Instances For
A wrapper structure for MessageData to enable for (ppCtx, e) in msg.exprs do notation.
- msg : MessageData
The
MessageDatawhose expressions will be iterated over.
Instances For
for (ppCtx, e) in msg.exprs do iterates through the expressions in MessageData together
with their ppCtx : PPContext. The ppCtx can be used to interpret the expression in a valid
MetaM context via ppCtx.runMetaM.
The monad must support BaseIO in order to interpret .ofLazy nodes in MessageData.
Expressions without a valid ppCtx are skipped.
Instances For
Equations
- Lean.MessageData.instForInExprsProdPPContextExpr = { forIn := fun {β : Type} (exprs : Lean.MessageData.Exprs) => exprs.msg.forExprsIn }
Find the expression in a message on which f does not return none.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Get all the expressions in a message, in order.
If you need the context of the expressions, prefer iterating over the expressions via
for (ppCtx, e) in msg.exprs do directly.
Equations
- One or more equations did not get rendered due to their size.