- ident : Lean.Lsp.RefIdent
FVarIds that are logically identical to this reference
aliases : Array Lean.Lsp.RefIdent- range : Lean.Lsp.Range
- stx : Lean.Syntax
- info : Lean.Elab.Info
- isBinder : Bool
Equations
- Lean.Server.instInhabitedReference = { default := { ident := default, aliases := default, range := default, stx := default, ci := default, info := default, isBinder := default } }
- definition : Option Lean.Server.Reference
- usages : Array Lean.Server.Reference
Equations
- Lean.Server.RefInfo.empty = { definition := none, usages := #[] }
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.Server.ModuleRefs.addRef self ref = let refInfo := Std.HashMap.findD self ref.ident Lean.Server.RefInfo.empty; Std.HashMap.insert self ref.ident (Lean.Server.RefInfo.addRef refInfo ref)
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Lsp.RefInfo.empty = { definition := none, usages := #[] }
Equations
- Lean.Lsp.RefInfo.merge a b = { definition := Option.orElse b.definition fun x => a.definition, usages := Array.append a.usages b.usages }
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.
- version : Nat
- module : Lean.Name
- references : Lean.Lsp.ModuleRefs
Content of individual .ilean
files
Equations
- Lean.Server.instFromJsonIlean = { fromJson? := [anonymous] }
Equations
- Lean.Server.instToJsonIlean = { toJson := [anonymous] }
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.
The FVarId
s of a function parameter in the function's signature and body
differ. However, they have TermInfo
nodes with binder := true
in the exact
same position. Moreover, macros such as do-reassignment x := e
may create
chains of variable definitions where a helper definition overlaps with a use
of a variable.
This function changes every such group to use a single FVarId
(the head of the
chain/DAG) and gets rid of duplicate definitions.
Equations
- One or more equations did not get rendered due to their size.
partial def
Lean.Server.combineFvars.findCanonicalBinder
(idMap : Std.HashMap Lean.FVarId Lean.FVarId)
(id : Lean.FVarId)
:
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.Server.findModuleRefs
(text : Lean.FileMap)
(trees : Array Lean.Elab.InfoTree)
(localVars : optParam Bool true)
:
Equations
- One or more equations did not get rendered due to their size.
References loaded from ilean files
ileans : Std.HashMap Lean.Name (System.FilePath × Lean.Lsp.ModuleRefs)References from workers, overriding the corresponding ilean files
workers : Std.HashMap Lean.Name (Nat × Lean.Lsp.ModuleRefs)
Equations
- Lean.Server.References.empty = { ileans := Std.HashMap.empty, workers := Std.HashMap.empty }
def
Lean.Server.References.addIlean
(self : Lean.Server.References)
(path : System.FilePath)
(ilean : Lean.Server.Ilean)
:
Equations
- Lean.Server.References.addIlean self path ilean = { ileans := Std.HashMap.insert self.ileans ilean.module (path, ilean.references), workers := self.workers }
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Server.References.updateWorkerRefs
(self : Lean.Server.References)
(name : Lean.Name)
(version : Nat)
(refs : Lean.Lsp.ModuleRefs)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Server.References.finalizeWorkerRefs
(self : Lean.Server.References)
(name : Lean.Name)
(version : Nat)
(refs : Lean.Lsp.ModuleRefs)
:
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Server.References.removeWorkerRefs self name = { ileans := self.ileans, workers := Std.HashMap.erase self.workers name }
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Server.References.findAt
(self : Lean.Server.References)
(module : Lean.Name)
(pos : Lean.Lsp.Position)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Server.References.referringTo
(self : Lean.Server.References)
(identModule : Lean.Name)
(ident : Lean.Lsp.RefIdent)
(srcSearchPath : Lean.SearchPath)
(includeDefinition : optParam Bool true)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Server.References.definitionOf?
(self : Lean.Server.References)
(ident : Lean.Lsp.RefIdent)
(srcSearchPath : Lean.SearchPath)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Server.References.definitionsMatching
{α : Type}
(self : Lean.Server.References)
(srcSearchPath : Lean.SearchPath)
(filter : Lean.Name → Option α)
(maxAmount? : optParam (Option Nat) none)
:
IO (Array (α × Lean.Lsp.Location))
Equations
- One or more equations did not get rendered due to their size.