def
Lean.Server.FileWorker.logSnapContent
(s : Lean.Server.Snapshots.Snapshot)
(text : Lean.FileMap)
:
Equations
- One or more equations did not get rendered due to their size.
- aborted: Lean.Server.FileWorker.ElabTaskError
- ioError: IO.Error → Lean.Server.FileWorker.ElabTaskError
Equations
- Lean.Server.FileWorker.instMonadLiftIOEIOElabTaskError = { monadLift := fun {α} act => IO.toEIO (fun a => Lean.Server.FileWorker.ElabTaskError.ioError a) act }
def
Lean.Server.FileWorker.CancelToken.check
{m : Type → Type}
[inst : MonadExceptOf Lean.Server.FileWorker.ElabTaskError m]
[inst : MonadLiftT (ST IO.RealWorld) m]
[inst : Monad m]
(tk : Lean.Server.FileWorker.CancelToken)
:
m Unit
Equations
- Lean.Server.FileWorker.CancelToken.check tk = do let c ← ST.Ref.get tk.ref if c = true then throw Lean.Server.FileWorker.ElabTaskError.aborted else pure PUnit.unit
Equations
- meta : Lean.Server.DocumentMeta
- cancelTk : Lean.Server.FileWorker.CancelToken
A document editable in the sense that we track the environment and parser state after each command so that edits can be applied without recompiling code appearing earlier in the file.
Objects that are being kept alive for the RPC client, together with their type names, mapped to by their RPC reference.
Note that we may currently have multiple references to the same object. It is only disposed of once all of those are gone. This simplifies the client a bit as it can drop every reference received separately.
aliveRefs : Std.PersistentHashMap Lean.Lsp.RpcRef (Lean.Name × NonScalar)Value to use for the next
RpcRef
. It is monotonically increasing to avoid any possible bugs resulting from its reuse.nextRef : USizeThe
IO.monoMsNow
time when the session expires. See$/lean/rpc/keepAlive
.expireTime : Nat
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Server.FileWorker.RpcSession.store
(st : Lean.Server.FileWorker.RpcSession)
(typeName : Lean.Name)
(obj : NonScalar)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Server.FileWorker.RpcSession.release
(st : Lean.Server.FileWorker.RpcSession)
(ref : Lean.Lsp.RpcRef)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Server.FileWorker.RpcSession.keptAlive
(monoMsNow : Nat)
(s : Lean.Server.FileWorker.RpcSession)
:
Equations
- Lean.Server.FileWorker.RpcSession.keptAlive monoMsNow s = { aliveRefs := s.aliveRefs, nextRef := s.nextRef, expireTime := monoMsNow + Lean.Server.FileWorker.RpcSession.keepAliveTimeMs }
Equations
- Lean.Server.FileWorker.RpcSession.hasExpired s = do let a ← liftM IO.monoMsNow pure (decide (s.expireTime ≤ a))
instance
Lean.Server.FileWorker.instMonadRpcSession
{m : Type → Type}
[inst : Monad m]
[inst : MonadStateOf Lean.Server.FileWorker.RpcSession m]
:
Equations
- One or more equations did not get rendered due to their size.