This file contains types for communication between the watchdog and the workers. These messages are not visible externally to users of the LSP server.
Most reference-related types have custom FromJson/ToJson implementations to reduce the size of the resulting JSON.
Information about a single import statement.
- module : StringName of the module that is imported. 
- isPrivate : BoolWhether the module is being imported via private import.
- isAll : BoolWhether the module is being imported via import all.
- isMeta : BoolWhether the module is being imported via meta import.
Instances For
Equations
Instances For
Equations
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
Equations
- Lean.Lsp.instBEqRefIdent.beq (Lean.Lsp.RefIdent.const a a_1) (Lean.Lsp.RefIdent.const b b_1) = (a == b && a_1 == b_1)
- Lean.Lsp.instBEqRefIdent.beq (Lean.Lsp.RefIdent.fvar a a_1) (Lean.Lsp.RefIdent.fvar b b_1) = (a == b && a_1 == b_1)
- Lean.Lsp.instBEqRefIdent.beq x✝¹ x✝ = false
Instances For
Equations
Equations
- Lean.Lsp.instHashableRefIdent.hash (Lean.Lsp.RefIdent.const a a_1) = mixHash (mixHash 0 (hash a)) (hash a_1)
- Lean.Lsp.instHashableRefIdent.hash (Lean.Lsp.RefIdent.fvar a a_1) = mixHash (mixHash 1 (hash a)) (hash a_1)
Instances For
Instances For
Equations
Equations
- Lean.Lsp.instOrdRefIdent.ord (Lean.Lsp.RefIdent.const a a_1) (Lean.Lsp.RefIdent.const b b_1) = (compare a b).then ((compare a_1 b_1).then Ordering.eq)
- Lean.Lsp.instOrdRefIdent.ord (Lean.Lsp.RefIdent.const a a_1) x✝ = Ordering.lt
- Lean.Lsp.instOrdRefIdent.ord x (Lean.Lsp.RefIdent.const b b_1) = Ordering.gt
- Lean.Lsp.instOrdRefIdent.ord (Lean.Lsp.RefIdent.fvar a a_1) (Lean.Lsp.RefIdent.fvar b b_1) = (compare a b).then ((compare a_1 b_1).then Ordering.eq)
Instances For
Equations
- Lean.Lsp.instOrdRefIdent = { compare := Lean.Lsp.instOrdRefIdent.ord }
Shortened representation of RefIdent for more compact serialization.
- c
(m n : String)
 : RefIdentJsonReprShortened representation of RefIdent.constfor more compact serialization.
- f
(m i : String)
 : RefIdentJsonReprShortened representation of RefIdent.fvarfor more compact serialization.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Lsp.RefIdent.instToJsonRefIdentJsonRepr.toJson (Lean.Lsp.RefIdent.RefIdentJsonRepr.c a a_1) = Lean.Json.mkObj [("c", Lean.Json.mkObj [("m", Lean.toJson a), ("n", Lean.toJson a_1)])]
- Lean.Lsp.RefIdent.instToJsonRefIdentJsonRepr.toJson (Lean.Lsp.RefIdent.RefIdentJsonRepr.f a a_1) = Lean.Json.mkObj [("f", Lean.Json.mkObj [("m", Lean.toJson a), ("i", Lean.toJson a_1)])]
Instances For
Equations
Instances For
Converts RefIdent from a JSON for RefIdentJsonRepr.
Equations
- Lean.Lsp.RefIdent.fromJson? s = do let __do_lift ← Lean.fromJson? s pure (Lean.Lsp.RefIdent.fromJsonRepr __do_lift)
Instances For
Converts RefIdent to a JSON for RefIdentJsonRepr.
Equations
- id.toJson = Lean.toJson id.toJsonRepr
Instances For
Equations
- Lean.Lsp.RefIdent.instFromJson = { fromJson? := Lean.Lsp.RefIdent.fromJson? }
Equations
- Lean.Lsp.RefIdent.instToJson = { toJson := Lean.Lsp.RefIdent.toJson }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Denotes the range of a reference, as well as the parent declaration of the reference. If the reference is itself a declaration, then it contains no parent declaration.
- range : RangeRange of the reference. 
- parentDecl? : Option ParentDeclParent declaration of the reference. noneif the reference is itself a declaration.
Instances For
Equations
Instances For
Definition site and usage sites of a reference. Obtained from Lean.Server.RefInfo.
- Definition site of the reference. May be - nonewhen we cannot find a definition site.
- Usage sites of the reference. 
Instances For
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.
References from a single module/file
Instances For
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.
Used in the $/lean/ileanHeaderInfo watchdog <- worker notifications.
Contains the direct imports of the file managed by a worker.
- version : NatVersion of the file these imports are from. 
- directImports : Array ImportInfoDirect imports of this file. 
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Lsp.instToJsonLeanILeanHeaderInfoParams.toJson x✝ = Lean.Json.mkObj [[("version", Lean.toJson x✝.version)], [("directImports", Lean.toJson x✝.directImports)]].flatten
Instances For
Used in the $/lean/ileanInfoUpdate and $/lean/ileanInfoFinal watchdog <- worker notifications.
Contains the definitions and references of the file managed by a worker.
- version : NatVersion of the file these references are from. 
- references : ModuleRefsAll references for the file. 
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Lsp.instToJsonLeanIleanInfoParams.toJson x✝ = Lean.Json.mkObj [[("version", Lean.toJson x✝.version)], [("references", Lean.toJson x✝.references)]].flatten
Instances For
Used in the $/lean/importClosure watchdog <- worker notification.
Contains the full import closure of the file managed by a worker.
- importClosure : Array DocumentUriFull import closure of the file. 
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Lsp.instToJsonLeanImportClosureParams.toJson x✝ = Lean.Json.mkObj [[("importClosure", Lean.toJson x✝.importClosure)]].flatten
Instances For
Used in the $/lean/importClosure watchdog -> worker notification.
Informs the worker that one of its dependencies has gone stale and likely needs to be rebuilt.
- staleDependency : DocumentUriThe dependency that is stale. 
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Lsp.instToJsonLeanStaleDependencyParams.toJson x✝ = Lean.Json.mkObj [[("staleDependency", Lean.toJson x✝.staleDependency)]].flatten
Instances For
LSP type for Lean.OpenDecl.
- allExcept
(«namespace» : Name)
(exceptions : Array Name)
 : OpenNamespaceAll declarations in «namespace»are opened, except forexceptions.
- renamed
(«from» to : Name)
 : OpenNamespaceThe declaration «from»is renamed toto.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
- Lean.Lsp.instToJsonOpenNamespace.toJson (Lean.Lsp.OpenNamespace.allExcept a a_1) = Lean.Json.mkObj [("allExcept", Lean.Json.mkObj [("namespace", Lean.toJson a), ("exceptions", Lean.toJson a_1)])]
- Lean.Lsp.instToJsonOpenNamespace.toJson (Lean.Lsp.OpenNamespace.renamed a a_1) = Lean.Json.mkObj [("renamed", Lean.Json.mkObj [("from", Lean.toJson a), ("to", Lean.toJson a_1)])]
Instances For
Query in the $/lean/queryModule watchdog <- worker request.
- identifier : StringIdentifier (potentially partial) to query. 
- openNamespaces : Array OpenNamespaceNamespaces that are open at the position of identifier. Used for accurately matching declarations againstidentifierin context.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Lean.Lsp.instToJsonLeanModuleQuery.toJson x✝ = Lean.Json.mkObj [[("identifier", Lean.toJson x✝.identifier)], [("openNamespaces", Lean.toJson x✝.openNamespaces)]].flatten
Instances For
Used in the $/lean/queryModule watchdog <- worker request, which is used by the worker to
extract information from the .ilean information in the watchdog.
- sourceRequestID : JsonRpc.RequestIDThe request ID in the context of which this worker -> watchdog request was emitted. Used for cancelling this request in the watchdog. 
- queries : Array LeanModuleQueryModule queries for extracting .ilean information in the watchdog. 
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Lsp.instToJsonLeanQueryModuleParams.toJson x✝ = Lean.Json.mkObj [[("sourceRequestID", Lean.toJson x✝.sourceRequestID)], [("queries", Lean.toJson x✝.queries)]].flatten
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Result for a single module query. Identifiers in the response are sorted descendingly by how well they match the query.
Instances For
Response for the $/lean/queryModule watchdog <- worker request.
- queryResults : Array LeanQueriedModuleResults for each query in LeanQueryModuleParams. Positions correspond toqueriesin the parameter of the request.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Lsp.instToJsonLeanQueryModuleResponse.toJson x✝ = Lean.Json.mkObj [[("queryResults", Lean.toJson x✝.queryResults)]].flatten
Instances For
Equations
- Lean.Lsp.instInhabitedLeanQueryModuleResponse.default = { queryResults := default }
Instances For
Name of a declaration in a given module.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
Instances For
LocationLink with additional meta-data that allows the watchdog to resolve the range of this
LocationLink. This is necessary because the position information from the .olean may be stale
(e.g. if the user has edited the file that the definition is from, but neither saved or built it),
while file workers sync their current reference information into the watchdog using ilean info
notifications, which is up-to-date.
- ident? : Option LeanDeclIdentIdentifier that caused this location link. 
- isDefault : BoolWhether this location link was generated by a fallback handler. If the file worker can't produce any non-fallback location links, the watchdog tries again using its reference information from the ileans and ilean updates. 
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.