Equations
- String.instInhabitedRange = { default := { start := default, stop := default } }
Equations
- String.instReprRange = { reprPrec := [anonymous] }
Equations
- String.instBEqRange = { beq := [anonymous] }
Equations
- String.instHashableRange = { hash := [anonymous] }
def
String.Range.contains
(r : String.Range)
(pos : String.Pos)
(includeStop : optParam Bool false)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.InfoTree.visitM
{m : Type → Type u_1}
{α : Type}
[inst : Monad m]
[inst : Inhabited α]
(preNode : optParam (Lean.Elab.ContextInfo → Lean.Elab.Info → Std.PersistentArray Lean.Elab.InfoTree → m Unit) fun x x x => pure ())
(postNode : Lean.Elab.ContextInfo → Lean.Elab.Info → Std.PersistentArray Lean.Elab.InfoTree → List (Option α) → m α)
:
Lean.Elab.InfoTree → m (Option α)
Visit nodes, passing in a surrounding context (the innermost one) and accumulating results on the way back up.
Equations
- Lean.Elab.InfoTree.visitM preNode postNode = Lean.Elab.InfoTree.visitM.go preNode postNode none
partial def
Lean.Elab.InfoTree.visitM.go
{m : Type → Type u_1}
{α : Type}
[inst : Monad m]
(preNode : optParam (Lean.Elab.ContextInfo → Lean.Elab.Info → Std.PersistentArray Lean.Elab.InfoTree → m Unit) fun x x x => pure ())
(postNode : Lean.Elab.ContextInfo → Lean.Elab.Info → Std.PersistentArray Lean.Elab.InfoTree → List (Option α) → m α)
:
Option Lean.Elab.ContextInfo → Lean.Elab.InfoTree → m (Option α)
def
Lean.Elab.InfoTree.collectNodesBottomUp
{α : Type}
(p : Lean.Elab.ContextInfo → Lean.Elab.Info → Std.PersistentArray Lean.Elab.InfoTree → List α → List α)
(i : Lean.Elab.InfoTree)
:
List α
Visit nodes bottom-up, passing in a surrounding context (the innermost one) and the union of nested results (empty at leaves).
Equations
- Lean.Elab.InfoTree.collectNodesBottomUp p i = Option.getD (Lean.Elab.InfoTree.visitM (fun x x x => pure ()) (fun ci i cs as => p ci i cs (List.join (List.filterMap id as))) i) []
def
Lean.Elab.InfoTree.deepestNodes
{α : Type}
(p : Lean.Elab.ContextInfo → Lean.Elab.Info → Std.PersistentArray Lean.Elab.InfoTree → Option α)
(infoTree : Lean.Elab.InfoTree)
:
List α
For every branch of the InfoTree
, find the deepest node in that branch for which p
returns
some _
and return the union of all such nodes. The visitor p
is given a node together with
its innermost surrounding ContextInfo
.
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.InfoTree.foldInfo
{α : Type u_1}
(f : Lean.Elab.ContextInfo → Lean.Elab.Info → α → α)
(init : α)
:
Equations
- Lean.Elab.InfoTree.foldInfo f init = Lean.Elab.InfoTree.foldInfo.go f none init
partial def
Lean.Elab.InfoTree.foldInfo.go
{α : Type u_1}
(f : Lean.Elab.ContextInfo → Lean.Elab.Info → α → α)
(ctx? : Option Lean.Elab.ContextInfo)
(a : α)
:
Equations
- Lean.Elab.Info.isTerm _fun_discr = match _fun_discr with | Lean.Elab.Info.ofTermInfo i => true | x => false
Equations
- Lean.Elab.Info.isCompletion _fun_discr = match _fun_discr with | Lean.Elab.Info.ofCompletionInfo i => true | x => false
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Info.lctx _fun_discr = match _fun_discr with | Lean.Elab.Info.ofTermInfo i => i.lctx | Lean.Elab.Info.ofFieldInfo i => i.lctx | x => Lean.LocalContext.empty
Equations
Equations
Equations
def
Lean.Elab.Info.contains
(i : Lean.Elab.Info)
(pos : String.Pos)
(includeStop : optParam Bool false)
:
Equations
- Lean.Elab.Info.contains i pos includeStop = Option.any (fun a => String.Range.contains a pos includeStop) (Lean.Elab.Info.range? i)
Equations
- Lean.Elab.Info.size? i = do let pos ← Lean.Elab.Info.pos? i let tailPos ← Lean.Elab.Info.tailPos? i pure (tailPos - pos)
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Info.occursBefore? i hoverPos = do let tailPos ← Lean.Elab.Info.tailPos? i guard (tailPos ≤ hoverPos) pure (hoverPos - tailPos)
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.InfoTree.hoverableInfoAt?
(t : Lean.Elab.InfoTree)
(hoverPos : String.Pos)
(includeStop : optParam Bool false)
(omitAppFns : optParam Bool false)
:
Find an info node, if any, which should be shown on hover/cursor at position hoverPos
.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Construct a hover popup, if any, from an info node in a context.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Info.fmtHover?.isAtomicFormat (Std.Format.text a) = true
- Lean.Elab.Info.fmtHover?.isAtomicFormat (Lean.Format.group f behavior) = Lean.Elab.Info.fmtHover?.isAtomicFormat f
- Lean.Elab.Info.fmtHover?.isAtomicFormat (Lean.Format.nest indent f) = Lean.Elab.Info.fmtHover?.isAtomicFormat f
- Lean.Elab.Info.fmtHover?.isAtomicFormat (Lean.Format.tag a f) = Lean.Elab.Info.fmtHover?.isAtomicFormat f
- Lean.Elab.Info.fmtHover?.isAtomicFormat _fun_discr = false
- ctxInfo : Lean.Elab.ContextInfo
- tacticInfo : Lean.Elab.TacticInfo
- useAfter : Bool
Whether the tactic info is further indented than the hover position.
indented : Bool- priority : Nat
def
Lean.Elab.InfoTree.goalsAt?
(text : Lean.FileMap)
(t : Lean.Elab.InfoTree)
(hoverPos : String.Pos)
:
Equations
- One or more equations did not get rendered due to their size.
partial def
Lean.Elab.InfoTree.goalsAt?.hasNestedTactic
(hoverPos : String.Pos)
(pos : String.Pos)
(tailPos : String.Pos)
:
Equations
- Lean.Elab.InfoTree.termGoalAt? t hoverPos = Lean.Elab.InfoTree.hoverableInfoAt? t hoverPos true true