File: .lake/packages/lean4/src/lean/Lean/Server/FileWorker/WidgetRequests.lean

full_name: Lean.Widget.MsgToInteractive
code: structure MsgToInteractive where
  msg : WithRpcRef MessageData
  indent : Nat
  deriving Inhabited, RpcEncodable
goal: Type

full_name: Lean.Widget.MsgToInteractive.msg
code: structure MsgToInteractive where
  msg : WithRpcRef MessageData
  indent : Nat
  deriving Inhabited, RpcEncodable
goal: Lean.Server.WithRpcRef Lean.MessageData

full_name: Lean.Widget.instInhabitedMsgToInteractive
code: structure MsgToInteractive where
  msg : WithRpcRef MessageData
  indent : Nat
  deriving Inhabited, RpcEncodable
goal: Inhabited Lean.Widget.MsgToInteractive

full_name: Lean.Widget.MsgToInteractive.indent
code: structure MsgToInteractive where
  msg : WithRpcRef MessageData
  indent : Nat
  deriving Inhabited, RpcEncodable
goal: Nat

full_name: Lean.Widget.Lean.Widget.MsgToInteractive.instRpcEncodableMsgToInteractive.dec._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.5
code: RpcEncodable
goal: Lean.Json → ExceptT String (ReaderT Lean.Server.RpcObjectStore Id) Lean.Widget.MsgToInteractive

full_name: Lean.Widget.Lean.Widget.MsgToInteractive.instRpcEncodableMsgToInteractive
code: RpcEncodable
goal: Lean.Server.RpcEncodable Lean.Widget.MsgToInteractive

full_name: Lean.Widget.Lean.Widget.MsgToInteractive.RpcEncodablePacket._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.5
code: RpcEncodable
goal: Type

full_name: Lean.Widget.Lean.Widget.MsgToInteractive.instFromJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.FromJson Lean.Widget.Lean.Widget.MsgToInteractive.RpcEncodablePacket✝

full_name: Lean.Widget.Lean.Widget.MsgToInteractive.instRpcEncodableMsgToInteractive.enc._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.5
code: RpcEncodable
goal: Lean.Widget.MsgToInteractive → StateM Lean.Server.RpcObjectStore Lean.Json

full_name: Lean.Widget.Lean.Widget.MsgToInteractive.instToJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.ToJson Lean.Widget.Lean.Widget.MsgToInteractive.RpcEncodablePacket✝

full_name: Lean.Widget.initFn._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.421
code: builtin_initialize
  registerBuiltinRpcProcedure
    `Lean.Widget.InteractiveDiagnostics.msgToInteractive
    MsgToInteractive
    (TaggedText MsgEmbed)
    fun ⟨⟨m⟩, i⟩ => RequestM.asTask do msgToInteractive m i (hasWidgets := true)
goal: IO Unit

full_name: Lean.Widget.InfoPopup.exprExplicit
code: /-- The information that the infoview uses to render a popup
for when the user hovers over an expression.
-/
structure InfoPopup where
  type : Option CodeWithInfos
  /-- Show the term with the implicit arguments. -/
  exprExplicit : Option CodeWithInfos
  /-- Docstring. In markdown. -/
  doc : Option String
  deriving Inhabited, RpcEncodable
goal: Option Lean.Widget.CodeWithInfos

full_name: Lean.Widget.InfoPopup
code: /-- The information that the infoview uses to render a popup
for when the user hovers over an expression.
-/
structure InfoPopup where
  type : Option CodeWithInfos
  /-- Show the term with the implicit arguments. -/
  exprExplicit : Option CodeWithInfos
  /-- Docstring. In markdown. -/
  doc : Option String
  deriving Inhabited, RpcEncodable
goal: Type

full_name: Lean.Widget.InfoPopup.doc
code: /-- The information that the infoview uses to render a popup
for when the user hovers over an expression.
-/
structure InfoPopup where
  type : Option CodeWithInfos
  /-- Show the term with the implicit arguments. -/
  exprExplicit : Option CodeWithInfos
  /-- Docstring. In markdown. -/
  doc : Option String
  deriving Inhabited, RpcEncodable
goal: Option String

full_name: Lean.Widget.instInhabitedInfoPopup
code: /-- The information that the infoview uses to render a popup
for when the user hovers over an expression.
-/
structure InfoPopup where
  type : Option CodeWithInfos
  /-- Show the term with the implicit arguments. -/
  exprExplicit : Option CodeWithInfos
  /-- Docstring. In markdown. -/
  doc : Option String
  deriving Inhabited, RpcEncodable
goal: Inhabited Lean.Widget.InfoPopup

full_name: Lean.Widget.InfoPopup.type
code: /-- The information that the infoview uses to render a popup
for when the user hovers over an expression.
-/
structure InfoPopup where
  type : Option CodeWithInfos
  /-- Show the term with the implicit arguments. -/
  exprExplicit : Option CodeWithInfos
  /-- Docstring. In markdown. -/
  doc : Option String
  deriving Inhabited, RpcEncodable
goal: Option Lean.Widget.CodeWithInfos

full_name: Lean.Widget.Lean.Widget.InfoPopup.instRpcEncodableInfoPopup.enc._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.475
code: RpcEncodable
goal: Lean.Widget.InfoPopup → StateM Lean.Server.RpcObjectStore Lean.Json

full_name: Lean.Widget.Lean.Widget.InfoPopup.instFromJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.FromJson Lean.Widget.Lean.Widget.InfoPopup.RpcEncodablePacket✝

full_name: Lean.Widget.Lean.Widget.InfoPopup.instRpcEncodableInfoPopup
code: RpcEncodable
goal: Lean.Server.RpcEncodable Lean.Widget.InfoPopup

full_name: Lean.Widget.Lean.Widget.InfoPopup.RpcEncodablePacket._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.475
code: RpcEncodable
goal: Type

full_name: Lean.Widget.Lean.Widget.InfoPopup.instRpcEncodableInfoPopup.dec._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.475
code: RpcEncodable
goal: Lean.Json → ExceptT String (ReaderT Lean.Server.RpcObjectStore Id) Lean.Widget.InfoPopup

full_name: Lean.Widget.Lean.Widget.InfoPopup.instToJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.ToJson Lean.Widget.Lean.Widget.InfoPopup.RpcEncodablePacket✝

full_name: Lean.Widget.makePopup.ppExprTaggedWithoutTopLevelHighlight
code: /-- Given elaborator info for a particular subexpression. Produce the `InfoPopup`.

The intended usage of this is for the infoview to pass the `InfoWithCtx` which
was stored for a particular `SubexprInfo` tag in a `TaggedText` generated with `ppExprTagged`.
 -/
def makePopup : WithRpcRef InfoWithCtx → RequestM (RequestTask InfoPopup)
  
goal: Lean.MetaM Lean.Widget.CodeWithInfos

full_name: Lean.Widget.makePopup
code: /-- Given elaborator info for a particular subexpression. Produce the `InfoPopup`.

The intended usage of this is for the infoview to pass the `InfoWithCtx` which
was stored for a particular `SubexprInfo` tag in a `TaggedText` generated with `ppExprTagged`.
 -/
def makePopup : WithRpcRef InfoWithCtx → RequestM (RequestTask InfoPopup)
  
goal: Lean.Server.WithRpcRef Lean.Elab.InfoWithCtx → Lean.Server.RequestM (Lean.Server.RequestTask Lean.Widget.InfoPopup)

full_name: Lean.Widget.initFn._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.1443
code: builtin_initialize
  registerBuiltinRpcProcedure
    `Lean.Widget.InteractiveDiagnostics.infoToInteractive
    (WithRpcRef InfoWithCtx)
    InfoPopup
    makePopup
goal: IO Unit

full_name: Lean.Widget.initFn._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.1464
code: builtin_initialize
  registerBuiltinRpcProcedure
    `Lean.Widget.getInteractiveGoals
    Lsp.PlainGoalParams
    (Option InteractiveGoals)
    FileWorker.getInteractiveGoals
goal: IO Unit

full_name: Lean.Widget.initFn._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.1485
code: builtin_initialize
  registerBuiltinRpcProcedure
    `Lean.Widget.getInteractiveTermGoal
    Lsp.PlainTermGoalParams
    (Option InteractiveTermGoal)
    FileWorker.getInteractiveTermGoal
goal: IO Unit

full_name: Lean.Widget.GetInteractiveDiagnosticsParams.lineRange?
code: structure GetInteractiveDiagnosticsParams where
  /-- Return diagnostics for these lines only if present,
  otherwise return all diagnostics. -/
  lineRange? : Option Lsp.LineRange
  deriving Inhabited, FromJson, ToJson
goal: Option Lean.Lsp.LineRange

full_name: Lean.Widget.instInhabitedGetInteractiveDiagnosticsParams
code: structure GetInteractiveDiagnosticsParams where
  /-- Return diagnostics for these lines only if present,
  otherwise return all diagnostics. -/
  lineRange? : Option Lsp.LineRange
  deriving Inhabited, FromJson, ToJson
goal: Inhabited Lean.Widget.GetInteractiveDiagnosticsParams

full_name: Lean.Widget.GetInteractiveDiagnosticsParams
code: structure GetInteractiveDiagnosticsParams where
  /-- Return diagnostics for these lines only if present,
  otherwise return all diagnostics. -/
  lineRange? : Option Lsp.LineRange
  deriving Inhabited, FromJson, ToJson
goal: Type

full_name: Lean.Widget.instFromJsonGetInteractiveDiagnosticsParams
code: FromJson
goal: Lean.FromJson Lean.Widget.GetInteractiveDiagnosticsParams

full_name: Lean.Widget.instToJsonGetInteractiveDiagnosticsParams
code: ToJson
goal: Lean.ToJson Lean.Widget.GetInteractiveDiagnosticsParams

full_name: Lean.Widget.GetGoToLocationParams
code: structure GetGoToLocationParams where
  kind : GoToKind
  info : WithRpcRef InfoWithCtx
  deriving RpcEncodable
goal: Type

full_name: Lean.Widget.GetGoToLocationParams.kind
code: structure GetGoToLocationParams where
  kind : GoToKind
  info : WithRpcRef InfoWithCtx
  deriving RpcEncodable
goal: Lean.Server.GoToKind

full_name: Lean.Widget.GetGoToLocationParams.info
code: structure GetGoToLocationParams where
  kind : GoToKind
  info : WithRpcRef InfoWithCtx
  deriving RpcEncodable
goal: Lean.Server.WithRpcRef Lean.Elab.InfoWithCtx

full_name: Lean.Widget.Lean.Widget.GetGoToLocationParams.instRpcEncodableGetGoToLocationParams
code: RpcEncodable
goal: Lean.Server.RpcEncodable Lean.Widget.GetGoToLocationParams

full_name: Lean.Widget.Lean.Widget.GetGoToLocationParams.RpcEncodablePacket._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.1618
code: RpcEncodable
goal: Type

full_name: Lean.Widget.Lean.Widget.GetGoToLocationParams.instRpcEncodableGetGoToLocationParams.enc._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.1618
code: RpcEncodable
goal: Lean.Widget.GetGoToLocationParams → StateM Lean.Server.RpcObjectStore Lean.Json

full_name: Lean.Widget.Lean.Widget.GetGoToLocationParams.instFromJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.FromJson Lean.Widget.Lean.Widget.GetGoToLocationParams.RpcEncodablePacket✝

full_name: Lean.Widget.Lean.Widget.GetGoToLocationParams.instToJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.ToJson Lean.Widget.Lean.Widget.GetGoToLocationParams.RpcEncodablePacket✝

full_name: Lean.Widget.Lean.Widget.GetGoToLocationParams.instRpcEncodableGetGoToLocationParams.dec._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.1618
code: RpcEncodable
goal: Lean.Json → ExceptT String (ReaderT Lean.Server.RpcObjectStore Id) Lean.Widget.GetGoToLocationParams

full_name: Lean.Widget.initFn._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.2023
code: builtin_initialize
  registerBuiltinRpcProcedure
    `Lean.Widget.getGoToLocation
    GetGoToLocationParams
    (Array Lsp.LocationLink)
    fun ⟨kind, ⟨i⟩⟩ => RequestM.asTask do
      let rc ← read
      let ls ← FileWorker.locationLinksOfInfo kind i
      if !ls.isEmpty then return ls
      -- TODO(WN): unify handling of delab'd (infoview) and elab'd (editor) applications
      let .ofTermInfo ti := i.info | return #[]
      let .app _ _ := ti.expr | return #[]
      let some nm := ti.expr.getAppFn.constName? | return #[]
      i.ctx.runMetaM ti.lctx <|
        locationLinksFromDecl rc.srcSearchPath rc.doc.meta.uri nm none
goal: IO Unit

full_name: Lean.Widget.lazyTraceChildrenToInteractive
code: def lazyTraceChildrenToInteractive (children : WithRpcRef LazyTraceChildren) :
    RequestM (RequestTask (Array (TaggedText MsgEmbed))) 
goal: Lean.Server.RequestM (Lean.Server.RequestTask (Array (Lean.Widget.TaggedText Lean.Widget.MsgEmbed)))

full_name: Lean.Widget.initFn._@..lake.packages.lean4.src.lean.Lean.Server.FileWorker.WidgetRequests._hyg.2342
code: builtin_initialize registerBuiltinRpcProcedure ``lazyTraceChildrenToInteractive _ _ lazyTraceChildrenToInteractive
goal: IO Unit