def
ProofWidgets.Util.joinArrays
{m : Type → Type}
[Monad m]
[Lean.MonadRef m]
[Lean.MonadQuotation m]
(arr : Array Lean.Term)
:
Sends #[a, b, c] to `(term| $a ++ $b ++ $c)
Instances For
A copy of Delaborator.annotateTermInfo for other syntactic categories.
Instances For
def
Lean.PrettyPrinter.Delaborator.withAnnotateTermLikeInfo
{n : SyntaxNodeKinds}
(d : DelabM (TSyntax n))
:
A copy of Delaborator.withAnnotateTermInfo for other syntactic categories.
Instances For
Certain monad transformers such as ReaderT and StateT/StateRefT
provide additional context (read-only) and state (mutable).
MonadSaveCtx m n means that m is a stack of contexts/states on top of n.
It provides a way to suspend an m-action by saving the "current" value of this stack.
For example, m = Lean.MetaM is a stack of contexts and states on top of n = EIO Lean.Exception.
Thus we have saveCtxM : Lean.MetaM α → Lean.MetaM (EIO Lean.Exception α).
- saveCtxM {α : Type} : m α → m (n α)
Transform an action
x : m αinto an actionm (n α)that- saves the current context/state of
m; and - returns an action
y : n αthat would use the saved context/state if run. Note that becauseyno longer has access tom's state, anyStateTchanges that it makes when you run it later will be discarded.
- saves the current context/state of
Instances
@[implicit_reducible]
instance
instMonadSaveCtxReaderT
{m n : Type → Type}
[MonadSaveCtx m n]
{ρ : Type}
:
MonadSaveCtx (ReaderT ρ m) n
@[implicit_reducible]
instance
instMonadSaveCtxStateT
{m n : Type → Type}
[Monad m]
[MonadSaveCtx m n]
{σ : Type}
:
MonadSaveCtx (StateT σ m) n
@[implicit_reducible]
instance
instMonadSaveCtxStateRefT'OfMonadLiftTST
{m n : Type → Type}
[Monad m]
[MonadSaveCtx m n]
{ω σ : Type}
[MonadLiftT (ST ω) m]
:
MonadSaveCtx (StateRefT' ω σ m) n