RPC infrastructure for storing and formatting code fragments, in particular Expr
s,
with environment and subexpression information.
- wasChanged: Lean.Widget.DiffTag
- willChange: Lean.Widget.DiffTag
- wasDeleted: Lean.Widget.DiffTag
- willDelete: Lean.Widget.DiffTag
- wasInserted: Lean.Widget.DiffTag
- willInsert: Lean.Widget.DiffTag
A tag indicating the diff status of the expression. Used when showing tactic diffs.
Instances For
Equations
- Lean.Widget.instToJsonDiffTag = { toJson := Lean.Widget.toJsonDiffTag✝ }
Equations
- Lean.Widget.instFromJsonDiffTag = { fromJson? := Lean.Widget.fromJsonDiffTag✝ }
The
Elab.Info
node with the semantics of this part of the output.The position of this subexpression within the top-level expression. See
Lean.SubExpr
.subexprPos : Lean.SubExpr.PosAsk the renderer to highlight this node in the given color.
diffStatus? : Option Lean.Widget.DiffTag
Information about a subexpression within delaborated code.
Instances For
Equations
- Lean.Widget.instRpcEncodableSubexprInfo = { rpcEncode := Lean.Widget.instRpcEncodableSubexprInfo.enc✝, rpcDecode := Lean.Widget.instRpcEncodableSubexprInfo.dec✝ }
@[inline]
Pretty-printed syntax (usually but not necessarily an Expr
) with embedded Info
s.
def
Lean.Widget.CodeWithInfos.mergePosMap
{m : Type → Type u_1}
{α : Type u_2}
[inst : Monad m]
(merger : Lean.Widget.SubexprInfo → α → m Lean.Widget.SubexprInfo)
(pm : Lean.SubExpr.PosMap α)
(tt : Lean.Widget.CodeWithInfos)
:
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Widget.SubexprInfo.withDiffTag tag c = { info := c.info, subexprPos := c.subexprPos, diffStatus? := some tag }
def
Lean.Widget.tagCodeInfos
(ctx : Lean.Elab.ContextInfo)
(infos : Lean.SubExpr.PosMap Lean.Elab.Info)
(tt : Lean.Widget.TaggedText (Nat × Nat))
:
Tags pretty-printed code with infos from the delaborator.
Equations
- Lean.Widget.tagCodeInfos ctx infos tt = Lean.Widget.tagCodeInfos.go ctx infos tt
partial def
Lean.Widget.tagCodeInfos.go
(ctx : Lean.Elab.ContextInfo)
(infos : Lean.SubExpr.PosMap Lean.Elab.Info)
(tt : Lean.Widget.TaggedText (Nat × Nat))
:
Equations
- One or more equations did not get rendered due to their size.