RPC infrastructure for storing and formatting code fragments, in particular Expr
s,
with environment and subexpression information.
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.Pos
Information about a subexpression within delaborated code.
Equations
- Lean.Widget.instInhabitedSubexprInfo = { default := { info := default, subexprPos := default } }
instance
Lean.Widget.instToJsonRpcEncodingPacket:
{info subexprPos : Type} →
[inst : Lean.ToJson info] →
[inst : Lean.ToJson subexprPos] → Lean.ToJson (Lean.Widget.RpcEncodingPacket✝ info subexprPos)
Equations
- Lean.Widget.instToJsonRpcEncodingPacket = { toJson := [anonymous] }
instance
Lean.Widget.instFromJsonRpcEncodingPacket:
{info subexprPos : Type} →
[inst : Lean.FromJson info] →
[inst : Lean.FromJson subexprPos] → Lean.FromJson (Lean.Widget.RpcEncodingPacket✝ info subexprPos)
Equations
- Lean.Widget.instFromJsonRpcEncodingPacket = { fromJson? := [anonymous] }
instance
Lean.Widget.instRpcEncodingSubexprInfoRpcEncodingPacket:
(info : Type) →
[inst : Lean.Server.RpcEncoding (Lean.Server.WithRpcRef Lean.Widget.InfoWithCtx) info] →
(subexprPos : Type) →
[inst : Lean.Server.RpcEncoding Lean.SubExpr.Pos subexprPos] →
Lean.Server.RpcEncoding Lean.Widget.SubexprInfo (Lean.Widget.RpcEncodingPacket✝ info subexprPos)
Equations
- One or more equations did not get rendered due to their size.
@[inline]
Pretty-printed syntax (usually but not necessarily an Expr
) with embedded Info
s.
def
Lean.Widget.tagExprInfos
(ctx : Lean.Elab.ContextInfo)
(infos : Std.RBMap Nat Lean.Elab.Info compare)
(tt : Lean.Widget.TaggedText (Nat × Nat))
:
Tags a pretty-printed Expr
with infos from the delaborator.
Equations
- Lean.Widget.tagExprInfos ctx infos tt = Lean.Widget.tagExprInfos.go ctx infos tt
partial def
Lean.Widget.tagExprInfos.go
(ctx : Lean.Elab.ContextInfo)
(infos : Std.RBMap Nat Lean.Elab.Info compare)
(tt : Lean.Widget.TaggedText (Nat × Nat))
:
Equations
- One or more equations did not get rendered due to their size.