diff --git a/src/Lean/Server/Rpc/RequestHandling.lean b/src/Lean/Server/Rpc/RequestHandling.lean index 8664f6651c..fd08356b20 100644 --- a/src/Lean/Server/Rpc/RequestHandling.lean +++ b/src/Lean/Server/Rpc/RequestHandling.lean @@ -36,6 +36,10 @@ private unsafe def evalRpcProcedureUnsafe (env : Environment) (opts : Options) ( private opaque evalRpcProcedure (env : Environment) (opts : Options) (procName : Name) : Except String RpcProcedure +/-- Checks whether a builtin RPC procedure exists with the given name. -/ +def existsBuiltinRpcProcedure (method : Name) : IO Bool := do + return (← builtinRpcProcedures.get).contains method + open RequestM in def handleRpcCall (p : Lsp.RpcCallParams) : RequestM (RequestTask Json) := do -- The imports are finished at this point, because the handleRequest function