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.
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
Find the expression in a message on which f does not return none.
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.