RPC infrastructure for storing and formatting code fragments, in particular Expr
s,
with environment and subexpression information.
Equations
- Lean.Widget.instToJsonDiffTag = { toJson := Lean.Widget.toJsonDiffTag✝ }
Equations
- Lean.Widget.instFromJsonDiffTag = { fromJson? := Lean.Widget.fromJsonDiffTag✝ }
Information about a subexpression within delaborated code.
The
Elab.Info
node with the semantics of this part of the output.- subexprPos : SubExpr.Pos
The position of this subexpression within the top-level expression. See
Lean.SubExpr
. In certain situations such as when goal states change between positions in a tactic-mode proof, we can show subexpression-level diffs between two expressions. This field asks the renderer to display the subexpression as in a diff view (e.g. red/green like
git diff
).
Instances For
Equations
- Lean.Widget.instRpcEncodableSubexprInfo = { rpcEncode := Lean.Widget.instRpcEncodableSubexprInfo.enc✝, rpcDecode := Lean.Widget.instRpcEncodableSubexprInfo.dec✝ }
@[reducible, inline]
Pretty-printed syntax (usually but not necessarily an Expr
) with embedded Info
s.
Instances For
def
Lean.Widget.CodeWithInfos.mergePosMap
{m : Type → Type u_1}
{α : Type u_2}
[Monad m]
(merger : SubexprInfo → α → m SubexprInfo)
(pm : SubExpr.PosMap α)
(tt : CodeWithInfos)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- tt.pretty = Lean.Widget.TaggedText.stripTags tt
Instances For
Equations
- Lean.Widget.SubexprInfo.withDiffTag tag c = { info := c.info, subexprPos := c.subexprPos, diffStatus? := some tag }
Instances For
def
Lean.Widget.tagCodeInfos
(ctx : Elab.ContextInfo)
(infos : SubExpr.PosMap Elab.Info)
(tt : 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
Instances For
partial def
Lean.Widget.tagCodeInfos.go
(ctx : Elab.ContextInfo)
(infos : SubExpr.PosMap Elab.Info)
(tt : TaggedText (Nat × Nat))
:
Equations
- One or more equations did not get rendered due to their size.