diff --git a/index.html b/index.html index 873180a0..b4347b19 100644 --- a/index.html +++ b/index.html @@ -1,2 +1,2 @@ -
Browse by name, by tag, the standard library and the OCaml manual (online, latest version).
Generated for /home/runner/work/linol/linol/_opam/lib
Browse by name, by tag, the standard library and the OCaml manual (online, latest version).
Generated for /home/runner/work/linol/linol/_opam/lib
Linol_lwt.IO_lwttype 'a t = 'a Lwt.tval return : 'a -> 'a tval failwith : string -> 'a ttype in_channel = Lwt_io.input Lwt_io.channeltype out_channel = Lwt_io.output Lwt_io.channelval stdin : in_channelval stdout : out_channelval read : in_channel -> bytes -> int -> int -> unit tval read_line : in_channel -> string tval write : out_channel -> bytes -> int -> int -> unit tval write_string : out_channel -> string -> unit tval fail : exn -> unit tJsonrpc2.IOtype 'a t = 'a IO_lwt.tval return : 'a -> 'a tval failwith : string -> 'a ttype in_channel = IO_lwt.in_channeltype out_channel = IO_lwt.out_channelval stdin : in_channelval stdout : out_channelval read : in_channel -> bytes -> int -> int -> unit tval read_line : in_channel -> string tval write : out_channel -> bytes -> int -> int -> unit tval write_string : out_channel -> string -> unit tval fail : exn -> unit tJsonrpc2.Req_idRequest ID.
The unique ID of a request, used by JSONRPC to map each request to its reply.
type t = Jsonrpc.Id.tval to_string : t -> stringString representation of the ID
Jsonrpc2.base_servermethod on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- Lsp.Client_notification.t ->
- unit IO.tmethod on_request : 'a. notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- id:Req_id.t ->
- 'a Lsp.Client_request.t ->
- 'a IO.tmethod spawn_query_handler : (unit -> unit IO.t) -> unitJsonrpc2.notify_backval mutable uri : Lsp.Types.DocumentUri.t optionmethod cancel_request : Jsonrpc.Id.t -> unit IO.tmethod get_uri : Lsp.Types.DocumentUri.t optionmethod send_diagnostic : Diagnostic.t list -> unit IO.tmethod send_log_msg : type_:Lsp__Types.MessageType.t -> string -> unit IO.tmethod send_notification : Lsp.Server_notification.t -> unit IO.tmethod send_request : 'from_server. 'from_server Lsp.Server_request.t ->
- (('from_server, Jsonrpc.Response.Error.t) result -> unit IO.t) ->
- Req_id.t IO.tmethod set_uri : Lsp.Types.DocumentUri.t -> unitmethod telemetry : Lsp__.Import.Json.t -> unit IO.tmethod work_done_progress_begin : Lsp.Types.WorkDoneProgressBegin.t ->
- unit IO.tmethod work_done_progress_end : Lsp.Types.WorkDoneProgressEnd.t -> unit IO.tmethod work_done_progress_report : Lsp.Types.WorkDoneProgressReport.t ->
- unit IO.tJsonrpc2.serverval docs : (Lsp.Types.DocumentUri.t, doc_state) Hashtbl.tmethod config_code_action_provider : [ `Bool of bool
- | `CodeActionOptions of
- Lsp.Types.CodeActionOptions.t ]method config_code_lens_options : Lsp.Types.CodeLensOptions.t optionmethod config_completion : Lsp.Types.CompletionOptions.t optionmethod config_definition : [ `Bool of bool
- | `DefinitionOptions of
- Lsp.Types.DefinitionOptions.t ]
- optionmethod config_hover : [ `Bool of bool
- | `HoverOptions of Lsp.Types.HoverOptions.t ]
- optionmethod config_modify_capabilities : Lsp.Types.ServerCapabilities.t ->
- Lsp.Types.ServerCapabilities.tmethod config_symbol : [ `Bool of bool
- | `DocumentSymbolOptions of
- Lsp.Types.DocumentSymbolOptions.t ]
- optionmethod config_sync_opts : Lsp.Types.TextDocumentSyncOptions.tmethod find_doc : Lsp.Types.DocumentUri.t -> doc_state optionmethod on_notif_doc_did_change : notify_back:notify_back ->
- Lsp.Types.VersionedTextDocumentIdentifier.t ->
- Lsp.Types.TextDocumentContentChangeEvent.t list ->
- old_content:string ->
- new_content:string ->
- unit IO.tmethod on_notif_doc_did_close : notify_back:notify_back ->
- Lsp.Types.TextDocumentIdentifier.t ->
- unit IO.tmethod on_notif_doc_did_open : notify_back:notify_back ->
- Lsp.Types.TextDocumentItem.t ->
- content:string ->
- unit IO.tmethod on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- Lsp.Client_notification.t ->
- unit IO.tmethod on_notification_unhandled : notify_back:notify_back ->
- Lsp.Client_notification.t ->
- unit IO.tmethod on_req_code_action : notify_back:notify_back ->
- id:Req_id.t ->
- Lsp.Types.CodeActionParams.t ->
- Lsp.Types.CodeActionResult.t IO.tmethod on_req_code_lens : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.CodeLens.t list IO.tmethod on_req_code_lens_resolve : notify_back:notify_back ->
- id:Req_id.t ->
- Lsp.Types.CodeLens.t ->
- Lsp.Types.CodeLens.t IO.tmethod on_req_completion : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- ctx:Lsp__Types.CompletionContext.t option ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- [ `CompletionList of Lsp__.Types.CompletionList.t
- | `List of Lsp__.Types.CompletionItem.t list ]
- option
- IO.tmethod on_req_definition : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.Locations.t option IO.tmethod on_req_execute_command : notify_back:notify_back ->
- id:Req_id.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- string ->
- Yojson.Safe.t list option ->
- Yojson.Safe.t IO.tmethod on_req_hover : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.Hover.t option IO.tmethod on_req_initialize : notify_back:notify_back ->
- Lsp.Types.InitializeParams.t ->
- Lsp.Types.InitializeResult.t IO.tmethod on_req_inlay_hint : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- range:Lsp.Types.Range.t ->
- unit ->
- Lsp.Types.InlayHint.t list option IO.tmethod on_req_symbol : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- unit ->
- [ `DocumentSymbol of Lsp__.Types.DocumentSymbol.t list
- | `SymbolInformation of Lsp__.Types.SymbolInformation.t list ]
- option
- IO.tmethod on_request : 'a. notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- id:Req_id.t ->
- 'a Lsp.Client_request.t ->
- 'a IO.tmethod on_request_unhandled : 'r. notify_back:notify_back ->
- id:Req_id.t ->
- 'r Lsp.Client_request.t ->
- 'r IO.tmethod on_unknown_notification : notify_back:notify_back ->
- Jsonrpc.Notification.t ->
- unit IO.tmethod on_unknown_request : notify_back:notify_back ->
- server_request:(server_request_handler_pair -> Req_id.t IO.t) ->
- id:Req_id.t ->
- string ->
- Jsonrpc.Structured.t option ->
- Yojson.Safe.t IO.tmethod spawn_query_handler : (unit -> unit IO.t) -> unitLinol_lwt.Jsonrpc2module IO : sig ... endmodule Position = Lsp.Types.Positionmodule Range = Lsp.Types.Rangemodule Diagnostic = Lsp.Types.Diagnosticmodule DiagnosticSeverity = Lsp.Types.DiagnosticSeveritymodule Req_id : sig ... endtype server_request_handler_pair = | Request_and_handler : 'from_server Lsp.Server_request.t
- * (('from_server, Jsonrpc.Response.Error.t) result ->
- unit IO.t) -> server_request_handler_pairtype send_request = server_request_handler_pair -> Req_id.t IO.tclass virtual base_server : object ... endval async : base_server -> (unit -> unit IO.t) -> unit IO.tclass notify_back : notify_back:(Lsp.Server_notification.t ->
- unit IO.t) -> server_request:(server_request_handler_pair ->
- Req_id.t IO.t) -> workDoneToken:[ `Int of int | `String of string ] option -> partialResultToken:'a -> ?version:
- int -> ?uri:Lsp.Types.DocumentUri.t -> unit -> object ... endtype nonrec doc_state = {uri : Lsp.Types.DocumentUri.t;languageId : string;version : int;content : string;}class virtual server : object ... endval create : ic:IO.in_channel -> oc:IO.out_channel -> server -> tval send_server_notification : t -> Lsp.Server_notification.t -> unit IO.tval send_server_request :
- t ->
- 'from_server Lsp.Server_request.t ->
- (('from_server, Jsonrpc.Response.Error.t) result -> unit IO.t) ->
- Req_id.t IO.tLinol_lwtmodule type IO = Linol.IOmodule IO_lwt :
- IO
- with type 'a t = 'a Lwt.t
- and type in_channel = Lwt_io.input Lwt_io.channel
- and type out_channel = Lwt_io.output Lwt_io.channelval spawn : (unit -> unit Lwt.t) -> unitSpawn function.
include module type of struct include Lsp.Types endmodule MarkedString = Lsp.Types.MarkedStringmodule DocumentUri = Lsp.Types.DocumentUrimodule ProgressToken = Lsp.Types.ProgressTokenmodule ProgressParams = Lsp.Types.ProgressParamsmodule NotebookDocumentSyncOptions = Lsp.Types.NotebookDocumentSyncOptionsmodule NotebookDocumentSyncRegistrationOptions =
- Lsp.Types.NotebookDocumentSyncRegistrationOptionsmodule NotebookDocumentFilter = Lsp.Types.NotebookDocumentFiltermodule TextDocumentFilter = Lsp.Types.TextDocumentFiltermodule SymbolTag = Lsp.Types.SymbolTagmodule SymbolKind = Lsp.Types.SymbolKindmodule ResourceOperationKind = Lsp.Types.ResourceOperationKindmodule FailureHandlingKind = Lsp.Types.FailureHandlingKindmodule MarkupKind = Lsp.Types.MarkupKindmodule TokenFormat = Lsp.Types.TokenFormatmodule PrepareSupportDefaultBehavior = Lsp.Types.PrepareSupportDefaultBehaviormodule DiagnosticTag = Lsp.Types.DiagnosticTagmodule FoldingRangeKind = Lsp.Types.FoldingRangeKindmodule InsertTextMode = Lsp.Types.InsertTextModemodule CompletionItemKind = Lsp.Types.CompletionItemKindmodule CompletionItemTag = Lsp.Types.CompletionItemTagmodule CodeActionKind = Lsp.Types.CodeActionKindmodule PositionEncodingKind = Lsp.Types.PositionEncodingKindmodule DiagnosticSeverity = Lsp.Types.DiagnosticSeveritymodule CodeActionTriggerKind = Lsp.Types.CodeActionTriggerKindmodule CompletionTriggerKind = Lsp.Types.CompletionTriggerKindmodule InsertTextFormat = Lsp.Types.InsertTextFormatmodule NotebookCellKind = Lsp.Types.NotebookCellKindmodule FileChangeType = Lsp.Types.FileChangeTypemodule WatchKind = Lsp.Types.WatchKindmodule DocumentHighlightKind = Lsp.Types.DocumentHighlightKindmodule FileOperationPatternKind = Lsp.Types.FileOperationPatternKindmodule TraceValues = Lsp.Types.TraceValuesmodule TextDocumentSyncKind = Lsp.Types.TextDocumentSyncKindmodule InlayHintKind = Lsp.Types.InlayHintKindmodule MessageType = Lsp.Types.MessageTypemodule UniquenessLevel = Lsp.Types.UniquenessLevelmodule MonikerKind = Lsp.Types.MonikerKindmodule SemanticTokenModifiers = Lsp.Types.SemanticTokenModifiersmodule SemanticTokenTypes = Lsp.Types.SemanticTokenTypesmodule SignatureHelpTriggerKind = Lsp.Types.SignatureHelpTriggerKindmodule TextDocumentSaveReason = Lsp.Types.TextDocumentSaveReasonmodule Position = Lsp.Types.Positionmodule Range = Lsp.Types.Rangemodule ChangeAnnotationIdentifier = Lsp.Types.ChangeAnnotationIdentifiermodule AnnotatedTextEdit = Lsp.Types.AnnotatedTextEditmodule DeleteFileOptions = Lsp.Types.DeleteFileOptionsmodule DeleteFile = Lsp.Types.DeleteFilemodule RenameFileOptions = Lsp.Types.RenameFileOptionsmodule RenameFile = Lsp.Types.RenameFilemodule CreateFileOptions = Lsp.Types.CreateFileOptionsmodule CreateFile = Lsp.Types.CreateFilemodule OptionalVersionedTextDocumentIdentifier =
- Lsp.Types.OptionalVersionedTextDocumentIdentifiermodule TextEdit = Lsp.Types.TextEditmodule TextDocumentEdit = Lsp.Types.TextDocumentEditmodule ChangeAnnotation = Lsp.Types.ChangeAnnotationmodule WorkspaceEdit = Lsp.Types.WorkspaceEditmodule ApplyWorkspaceEditParams = Lsp.Types.ApplyWorkspaceEditParamsmodule ApplyWorkspaceEditResult = Lsp.Types.ApplyWorkspaceEditResultmodule BaseSymbolInformation = Lsp.Types.BaseSymbolInformationmodule CallHierarchyClientCapabilities =
- Lsp.Types.CallHierarchyClientCapabilitiesmodule CallHierarchyItem = Lsp.Types.CallHierarchyItemmodule CallHierarchyIncomingCall = Lsp.Types.CallHierarchyIncomingCallmodule CallHierarchyIncomingCallsParams =
- Lsp.Types.CallHierarchyIncomingCallsParamsmodule CallHierarchyOptions = Lsp.Types.CallHierarchyOptionsmodule CallHierarchyOutgoingCall = Lsp.Types.CallHierarchyOutgoingCallmodule CallHierarchyOutgoingCallsParams =
- Lsp.Types.CallHierarchyOutgoingCallsParamsmodule TextDocumentIdentifier = Lsp.Types.TextDocumentIdentifiermodule CallHierarchyPrepareParams = Lsp.Types.CallHierarchyPrepareParamsmodule NotebookCellTextDocumentFilter =
- Lsp.Types.NotebookCellTextDocumentFiltermodule DocumentFilter = Lsp.Types.DocumentFiltermodule DocumentSelector = Lsp.Types.DocumentSelectormodule CallHierarchyRegistrationOptions =
- Lsp.Types.CallHierarchyRegistrationOptionsmodule CancelParams = Lsp.Types.CancelParamsmodule WorkspaceEditClientCapabilities =
- Lsp.Types.WorkspaceEditClientCapabilitiesmodule WorkspaceSymbolClientCapabilities =
- Lsp.Types.WorkspaceSymbolClientCapabilitiesmodule SemanticTokensWorkspaceClientCapabilities =
- Lsp.Types.SemanticTokensWorkspaceClientCapabilitiesmodule InlineValueWorkspaceClientCapabilities =
- Lsp.Types.InlineValueWorkspaceClientCapabilitiesmodule InlayHintWorkspaceClientCapabilities =
- Lsp.Types.InlayHintWorkspaceClientCapabilitiesmodule FileOperationClientCapabilities =
- Lsp.Types.FileOperationClientCapabilitiesmodule ExecuteCommandClientCapabilities =
- Lsp.Types.ExecuteCommandClientCapabilitiesmodule DidChangeWatchedFilesClientCapabilities =
- Lsp.Types.DidChangeWatchedFilesClientCapabilitiesmodule DidChangeConfigurationClientCapabilities =
- Lsp.Types.DidChangeConfigurationClientCapabilitiesmodule DiagnosticWorkspaceClientCapabilities =
- Lsp.Types.DiagnosticWorkspaceClientCapabilitiesmodule CodeLensWorkspaceClientCapabilities =
- Lsp.Types.CodeLensWorkspaceClientCapabilitiesmodule WorkspaceClientCapabilities = Lsp.Types.WorkspaceClientCapabilitiesmodule ShowMessageRequestClientCapabilities =
- Lsp.Types.ShowMessageRequestClientCapabilitiesmodule ShowDocumentClientCapabilities =
- Lsp.Types.ShowDocumentClientCapabilitiesmodule WindowClientCapabilities = Lsp.Types.WindowClientCapabilitiesmodule TypeHierarchyClientCapabilities =
- Lsp.Types.TypeHierarchyClientCapabilitiesmodule TypeDefinitionClientCapabilities =
- Lsp.Types.TypeDefinitionClientCapabilitiesmodule TextDocumentSyncClientCapabilities =
- Lsp.Types.TextDocumentSyncClientCapabilitiesmodule SignatureHelpClientCapabilities =
- Lsp.Types.SignatureHelpClientCapabilitiesmodule SemanticTokensClientCapabilities =
- Lsp.Types.SemanticTokensClientCapabilitiesmodule SelectionRangeClientCapabilities =
- Lsp.Types.SelectionRangeClientCapabilitiesmodule RenameClientCapabilities = Lsp.Types.RenameClientCapabilitiesmodule ReferenceClientCapabilities = Lsp.Types.ReferenceClientCapabilitiesmodule DocumentRangeFormattingClientCapabilities =
- Lsp.Types.DocumentRangeFormattingClientCapabilitiesmodule PublishDiagnosticsClientCapabilities =
- Lsp.Types.PublishDiagnosticsClientCapabilitiesmodule DocumentOnTypeFormattingClientCapabilities =
- Lsp.Types.DocumentOnTypeFormattingClientCapabilitiesmodule MonikerClientCapabilities = Lsp.Types.MonikerClientCapabilitiesmodule LinkedEditingRangeClientCapabilities =
- Lsp.Types.LinkedEditingRangeClientCapabilitiesmodule InlineValueClientCapabilities = Lsp.Types.InlineValueClientCapabilitiesmodule InlayHintClientCapabilities = Lsp.Types.InlayHintClientCapabilitiesmodule ImplementationClientCapabilities =
- Lsp.Types.ImplementationClientCapabilitiesmodule HoverClientCapabilities = Lsp.Types.HoverClientCapabilitiesmodule DocumentFormattingClientCapabilities =
- Lsp.Types.DocumentFormattingClientCapabilitiesmodule FoldingRangeClientCapabilities =
- Lsp.Types.FoldingRangeClientCapabilitiesmodule DocumentSymbolClientCapabilities =
- Lsp.Types.DocumentSymbolClientCapabilitiesmodule DocumentLinkClientCapabilities =
- Lsp.Types.DocumentLinkClientCapabilitiesmodule DocumentHighlightClientCapabilities =
- Lsp.Types.DocumentHighlightClientCapabilitiesmodule DiagnosticClientCapabilities = Lsp.Types.DiagnosticClientCapabilitiesmodule DefinitionClientCapabilities = Lsp.Types.DefinitionClientCapabilitiesmodule DeclarationClientCapabilities = Lsp.Types.DeclarationClientCapabilitiesmodule CompletionClientCapabilities = Lsp.Types.CompletionClientCapabilitiesmodule DocumentColorClientCapabilities =
- Lsp.Types.DocumentColorClientCapabilitiesmodule CodeLensClientCapabilities = Lsp.Types.CodeLensClientCapabilitiesmodule CodeActionClientCapabilities = Lsp.Types.CodeActionClientCapabilitiesmodule TextDocumentClientCapabilities =
- Lsp.Types.TextDocumentClientCapabilitiesmodule NotebookDocumentSyncClientCapabilities =
- Lsp.Types.NotebookDocumentSyncClientCapabilitiesmodule NotebookDocumentClientCapabilities =
- Lsp.Types.NotebookDocumentClientCapabilitiesmodule RegularExpressionsClientCapabilities =
- Lsp.Types.RegularExpressionsClientCapabilitiesmodule MarkdownClientCapabilities = Lsp.Types.MarkdownClientCapabilitiesmodule GeneralClientCapabilities = Lsp.Types.GeneralClientCapabilitiesmodule ClientCapabilities = Lsp.Types.ClientCapabilitiesmodule Location = Lsp.Types.Locationmodule DiagnosticRelatedInformation = Lsp.Types.DiagnosticRelatedInformationmodule CodeDescription = Lsp.Types.CodeDescriptionmodule Diagnostic = Lsp.Types.Diagnosticmodule Command = Lsp.Types.Commandmodule CodeAction = Lsp.Types.CodeActionmodule CodeActionContext = Lsp.Types.CodeActionContextmodule CodeActionOptions = Lsp.Types.CodeActionOptionsmodule CodeActionParams = Lsp.Types.CodeActionParamsmodule CodeActionRegistrationOptions = Lsp.Types.CodeActionRegistrationOptionsmodule CodeLens = Lsp.Types.CodeLensmodule CodeLensOptions = Lsp.Types.CodeLensOptionsmodule CodeLensParams = Lsp.Types.CodeLensParamsmodule CodeLensRegistrationOptions = Lsp.Types.CodeLensRegistrationOptionsmodule Color = Lsp.Types.Colormodule ColorInformation = Lsp.Types.ColorInformationmodule ColorPresentation = Lsp.Types.ColorPresentationmodule ColorPresentationParams = Lsp.Types.ColorPresentationParamsmodule CompletionContext = Lsp.Types.CompletionContextmodule InsertReplaceEdit = Lsp.Types.InsertReplaceEditmodule CompletionItemLabelDetails = Lsp.Types.CompletionItemLabelDetailsmodule MarkupContent = Lsp.Types.MarkupContentmodule CompletionItem = Lsp.Types.CompletionItemmodule CompletionList = Lsp.Types.CompletionListmodule CompletionOptions = Lsp.Types.CompletionOptionsmodule CompletionParams = Lsp.Types.CompletionParamsmodule CompletionRegistrationOptions = Lsp.Types.CompletionRegistrationOptionsmodule ConfigurationItem = Lsp.Types.ConfigurationItemmodule ConfigurationParams = Lsp.Types.ConfigurationParamsmodule FileCreate = Lsp.Types.FileCreatemodule CreateFilesParams = Lsp.Types.CreateFilesParamsmodule Declaration = Lsp.Types.Declarationmodule LocationLink = Lsp.Types.LocationLinkmodule DeclarationLink = Lsp.Types.DeclarationLinkmodule DeclarationOptions = Lsp.Types.DeclarationOptionsmodule DeclarationParams = Lsp.Types.DeclarationParamsmodule DeclarationRegistrationOptions =
- Lsp.Types.DeclarationRegistrationOptionsmodule Definition = Lsp.Types.Definitionmodule DefinitionLink = Lsp.Types.DefinitionLinkmodule DefinitionOptions = Lsp.Types.DefinitionOptionsmodule DefinitionParams = Lsp.Types.DefinitionParamsmodule DefinitionRegistrationOptions = Lsp.Types.DefinitionRegistrationOptionsmodule FileDelete = Lsp.Types.FileDeletemodule DeleteFilesParams = Lsp.Types.DeleteFilesParamsmodule DiagnosticOptions = Lsp.Types.DiagnosticOptionsmodule DiagnosticRegistrationOptions = Lsp.Types.DiagnosticRegistrationOptionsmodule DiagnosticServerCancellationData =
- Lsp.Types.DiagnosticServerCancellationDatamodule DidChangeConfigurationParams = Lsp.Types.DidChangeConfigurationParamsmodule DidChangeConfigurationRegistrationOptions =
- Lsp.Types.DidChangeConfigurationRegistrationOptionsmodule VersionedNotebookDocumentIdentifier =
- Lsp.Types.VersionedNotebookDocumentIdentifiermodule TextDocumentContentChangeEvent =
- Lsp.Types.TextDocumentContentChangeEventmodule VersionedTextDocumentIdentifier =
- Lsp.Types.VersionedTextDocumentIdentifiermodule ExecutionSummary = Lsp.Types.ExecutionSummarymodule NotebookCell = Lsp.Types.NotebookCellmodule TextDocumentItem = Lsp.Types.TextDocumentItemmodule NotebookCellArrayChange = Lsp.Types.NotebookCellArrayChangemodule NotebookDocumentChangeEvent = Lsp.Types.NotebookDocumentChangeEventmodule DidChangeNotebookDocumentParams =
- Lsp.Types.DidChangeNotebookDocumentParamsmodule DidChangeTextDocumentParams = Lsp.Types.DidChangeTextDocumentParamsmodule FileEvent = Lsp.Types.FileEventmodule DidChangeWatchedFilesParams = Lsp.Types.DidChangeWatchedFilesParamsmodule Pattern = Lsp.Types.Patternmodule WorkspaceFolder = Lsp.Types.WorkspaceFoldermodule RelativePattern = Lsp.Types.RelativePatternmodule GlobPattern = Lsp.Types.GlobPatternmodule FileSystemWatcher = Lsp.Types.FileSystemWatchermodule DidChangeWatchedFilesRegistrationOptions =
- Lsp.Types.DidChangeWatchedFilesRegistrationOptionsmodule WorkspaceFoldersChangeEvent = Lsp.Types.WorkspaceFoldersChangeEventmodule DidChangeWorkspaceFoldersParams =
- Lsp.Types.DidChangeWorkspaceFoldersParamsmodule NotebookDocumentIdentifier = Lsp.Types.NotebookDocumentIdentifiermodule DidCloseNotebookDocumentParams =
- Lsp.Types.DidCloseNotebookDocumentParamsmodule DidCloseTextDocumentParams = Lsp.Types.DidCloseTextDocumentParamsmodule NotebookDocument = Lsp.Types.NotebookDocumentmodule DidOpenNotebookDocumentParams = Lsp.Types.DidOpenNotebookDocumentParamsmodule DidOpenTextDocumentParams = Lsp.Types.DidOpenTextDocumentParamsmodule DidSaveNotebookDocumentParams = Lsp.Types.DidSaveNotebookDocumentParamsmodule DidSaveTextDocumentParams = Lsp.Types.DidSaveTextDocumentParamsmodule DocumentColorOptions = Lsp.Types.DocumentColorOptionsmodule DocumentColorParams = Lsp.Types.DocumentColorParamsmodule DocumentColorRegistrationOptions =
- Lsp.Types.DocumentColorRegistrationOptionsmodule DocumentDiagnosticParams = Lsp.Types.DocumentDiagnosticParamsmodule UnchangedDocumentDiagnosticReport =
- Lsp.Types.UnchangedDocumentDiagnosticReportmodule FullDocumentDiagnosticReport = Lsp.Types.FullDocumentDiagnosticReportmodule RelatedUnchangedDocumentDiagnosticReport =
- Lsp.Types.RelatedUnchangedDocumentDiagnosticReportmodule RelatedFullDocumentDiagnosticReport =
- Lsp.Types.RelatedFullDocumentDiagnosticReportmodule DocumentDiagnosticReport = Lsp.Types.DocumentDiagnosticReportmodule DocumentDiagnosticReportPartialResult =
- Lsp.Types.DocumentDiagnosticReportPartialResultmodule DocumentFormattingOptions = Lsp.Types.DocumentFormattingOptionsmodule FormattingOptions = Lsp.Types.FormattingOptionsmodule DocumentFormattingParams = Lsp.Types.DocumentFormattingParamsmodule DocumentFormattingRegistrationOptions =
- Lsp.Types.DocumentFormattingRegistrationOptionsmodule DocumentHighlight = Lsp.Types.DocumentHighlightmodule DocumentHighlightOptions = Lsp.Types.DocumentHighlightOptionsmodule DocumentHighlightParams = Lsp.Types.DocumentHighlightParamsmodule DocumentHighlightRegistrationOptions =
- Lsp.Types.DocumentHighlightRegistrationOptionsmodule DocumentLink = Lsp.Types.DocumentLinkmodule DocumentLinkOptions = Lsp.Types.DocumentLinkOptionsmodule DocumentLinkParams = Lsp.Types.DocumentLinkParamsmodule DocumentLinkRegistrationOptions =
- Lsp.Types.DocumentLinkRegistrationOptionsmodule DocumentOnTypeFormattingOptions =
- Lsp.Types.DocumentOnTypeFormattingOptionsmodule DocumentOnTypeFormattingParams =
- Lsp.Types.DocumentOnTypeFormattingParamsmodule DocumentOnTypeFormattingRegistrationOptions =
- Lsp.Types.DocumentOnTypeFormattingRegistrationOptionsmodule DocumentRangeFormattingOptions =
- Lsp.Types.DocumentRangeFormattingOptionsmodule DocumentRangeFormattingParams = Lsp.Types.DocumentRangeFormattingParamsmodule DocumentRangeFormattingRegistrationOptions =
- Lsp.Types.DocumentRangeFormattingRegistrationOptionsmodule DocumentSymbol = Lsp.Types.DocumentSymbolmodule DocumentSymbolOptions = Lsp.Types.DocumentSymbolOptionsmodule DocumentSymbolParams = Lsp.Types.DocumentSymbolParamsmodule DocumentSymbolRegistrationOptions =
- Lsp.Types.DocumentSymbolRegistrationOptionsmodule ExecuteCommandOptions = Lsp.Types.ExecuteCommandOptionsmodule ExecuteCommandParams = Lsp.Types.ExecuteCommandParamsmodule ExecuteCommandRegistrationOptions =
- Lsp.Types.ExecuteCommandRegistrationOptionsmodule FileOperationPatternOptions = Lsp.Types.FileOperationPatternOptionsmodule FileOperationPattern = Lsp.Types.FileOperationPatternmodule FileOperationFilter = Lsp.Types.FileOperationFiltermodule FileOperationRegistrationOptions =
- Lsp.Types.FileOperationRegistrationOptionsmodule FileOperationOptions = Lsp.Types.FileOperationOptionsmodule FileRename = Lsp.Types.FileRenamemodule FoldingRange = Lsp.Types.FoldingRangemodule FoldingRangeOptions = Lsp.Types.FoldingRangeOptionsmodule FoldingRangeParams = Lsp.Types.FoldingRangeParamsmodule FoldingRangeRegistrationOptions =
- Lsp.Types.FoldingRangeRegistrationOptionsmodule Hover = Lsp.Types.Hovermodule HoverOptions = Lsp.Types.HoverOptionsmodule HoverParams = Lsp.Types.HoverParamsmodule HoverRegistrationOptions = Lsp.Types.HoverRegistrationOptionsmodule ImplementationOptions = Lsp.Types.ImplementationOptionsmodule ImplementationParams = Lsp.Types.ImplementationParamsmodule ImplementationRegistrationOptions =
- Lsp.Types.ImplementationRegistrationOptionsmodule InitializeError = Lsp.Types.InitializeErrormodule InitializeParams = Lsp.Types.InitializeParamsmodule WorkspaceSymbolOptions = Lsp.Types.WorkspaceSymbolOptionsmodule WorkspaceFoldersServerCapabilities =
- Lsp.Types.WorkspaceFoldersServerCapabilitiesmodule TypeHierarchyRegistrationOptions =
- Lsp.Types.TypeHierarchyRegistrationOptionsmodule TypeHierarchyOptions = Lsp.Types.TypeHierarchyOptionsmodule TypeDefinitionRegistrationOptions =
- Lsp.Types.TypeDefinitionRegistrationOptionsmodule TypeDefinitionOptions = Lsp.Types.TypeDefinitionOptionsmodule SaveOptions = Lsp.Types.SaveOptionsmodule TextDocumentSyncOptions = Lsp.Types.TextDocumentSyncOptionsmodule SignatureHelpOptions = Lsp.Types.SignatureHelpOptionsmodule SemanticTokensLegend = Lsp.Types.SemanticTokensLegendmodule SemanticTokensRegistrationOptions =
- Lsp.Types.SemanticTokensRegistrationOptionsmodule SemanticTokensOptions = Lsp.Types.SemanticTokensOptionsmodule SelectionRangeRegistrationOptions =
- Lsp.Types.SelectionRangeRegistrationOptionsmodule SelectionRangeOptions = Lsp.Types.SelectionRangeOptionsmodule RenameOptions = Lsp.Types.RenameOptionsmodule ReferenceOptions = Lsp.Types.ReferenceOptionsmodule MonikerRegistrationOptions = Lsp.Types.MonikerRegistrationOptionsmodule MonikerOptions = Lsp.Types.MonikerOptionsmodule LinkedEditingRangeRegistrationOptions =
- Lsp.Types.LinkedEditingRangeRegistrationOptionsmodule LinkedEditingRangeOptions = Lsp.Types.LinkedEditingRangeOptionsmodule InlineValueRegistrationOptions =
- Lsp.Types.InlineValueRegistrationOptionsmodule InlineValueOptions = Lsp.Types.InlineValueOptionsmodule InlayHintRegistrationOptions = Lsp.Types.InlayHintRegistrationOptionsmodule InlayHintOptions = Lsp.Types.InlayHintOptionsmodule ServerCapabilities = Lsp.Types.ServerCapabilitiesmodule InitializeResult = Lsp.Types.InitializeResultmodule InitializedParams_ = Lsp.Types.InitializedParams_module InlayHintLabelPart = Lsp.Types.InlayHintLabelPartmodule InlayHint = Lsp.Types.InlayHintmodule InlayHintParams = Lsp.Types.InlayHintParamsmodule InlineValueEvaluatableExpression =
- Lsp.Types.InlineValueEvaluatableExpressionmodule InlineValueVariableLookup = Lsp.Types.InlineValueVariableLookupmodule InlineValueText = Lsp.Types.InlineValueTextmodule InlineValue = Lsp.Types.InlineValuemodule InlineValueContext = Lsp.Types.InlineValueContextmodule InlineValueParams = Lsp.Types.InlineValueParamsmodule LinkedEditingRangeParams = Lsp.Types.LinkedEditingRangeParamsmodule LinkedEditingRanges = Lsp.Types.LinkedEditingRangesmodule LogMessageParams = Lsp.Types.LogMessageParamsmodule LogTraceParams = Lsp.Types.LogTraceParamsmodule MessageActionItem = Lsp.Types.MessageActionItemmodule Moniker = Lsp.Types.Monikermodule MonikerParams = Lsp.Types.MonikerParamsmodule ParameterInformation = Lsp.Types.ParameterInformationmodule PartialResultParams = Lsp.Types.PartialResultParamsmodule PrepareRenameParams = Lsp.Types.PrepareRenameParamsmodule PreviousResultId = Lsp.Types.PreviousResultIdmodule PublishDiagnosticsParams = Lsp.Types.PublishDiagnosticsParamsmodule ReferenceContext = Lsp.Types.ReferenceContextmodule ReferenceParams = Lsp.Types.ReferenceParamsmodule ReferenceRegistrationOptions = Lsp.Types.ReferenceRegistrationOptionsmodule Registration = Lsp.Types.Registrationmodule RegistrationParams = Lsp.Types.RegistrationParamsmodule RenameFilesParams = Lsp.Types.RenameFilesParamsmodule RenameParams = Lsp.Types.RenameParamsmodule RenameRegistrationOptions = Lsp.Types.RenameRegistrationOptionsmodule ResourceOperation = Lsp.Types.ResourceOperationmodule SelectionRange = Lsp.Types.SelectionRangemodule SelectionRangeParams = Lsp.Types.SelectionRangeParamsmodule SemanticTokens = Lsp.Types.SemanticTokensmodule SemanticTokensEdit = Lsp.Types.SemanticTokensEditmodule SemanticTokensDelta = Lsp.Types.SemanticTokensDeltamodule SemanticTokensDeltaParams = Lsp.Types.SemanticTokensDeltaParamsmodule SemanticTokensDeltaPartialResult =
- Lsp.Types.SemanticTokensDeltaPartialResultmodule SemanticTokensParams = Lsp.Types.SemanticTokensParamsmodule SemanticTokensPartialResult = Lsp.Types.SemanticTokensPartialResultmodule SemanticTokensRangeParams = Lsp.Types.SemanticTokensRangeParamsmodule SetTraceParams = Lsp.Types.SetTraceParamsmodule ShowDocumentParams = Lsp.Types.ShowDocumentParamsmodule ShowDocumentResult = Lsp.Types.ShowDocumentResultmodule ShowMessageParams = Lsp.Types.ShowMessageParamsmodule ShowMessageRequestParams = Lsp.Types.ShowMessageRequestParamsmodule SignatureInformation = Lsp.Types.SignatureInformationmodule SignatureHelp = Lsp.Types.SignatureHelpmodule SignatureHelpContext = Lsp.Types.SignatureHelpContextmodule SignatureHelpParams = Lsp.Types.SignatureHelpParamsmodule SignatureHelpRegistrationOptions =
- Lsp.Types.SignatureHelpRegistrationOptionsmodule StaticRegistrationOptions = Lsp.Types.StaticRegistrationOptionsmodule SymbolInformation = Lsp.Types.SymbolInformationmodule T = Lsp.Types.Tmodule TextDocumentChangeRegistrationOptions =
- Lsp.Types.TextDocumentChangeRegistrationOptionsmodule TextDocumentPositionParams = Lsp.Types.TextDocumentPositionParamsmodule TextDocumentRegistrationOptions =
- Lsp.Types.TextDocumentRegistrationOptionsmodule TextDocumentSaveRegistrationOptions =
- Lsp.Types.TextDocumentSaveRegistrationOptionsmodule TypeDefinitionParams = Lsp.Types.TypeDefinitionParamsmodule TypeHierarchyItem = Lsp.Types.TypeHierarchyItemmodule TypeHierarchyPrepareParams = Lsp.Types.TypeHierarchyPrepareParamsmodule TypeHierarchySubtypesParams = Lsp.Types.TypeHierarchySubtypesParamsmodule TypeHierarchySupertypesParams = Lsp.Types.TypeHierarchySupertypesParamsmodule Unregistration = Lsp.Types.Unregistrationmodule UnregistrationParams = Lsp.Types.UnregistrationParamsmodule WillSaveTextDocumentParams = Lsp.Types.WillSaveTextDocumentParamsmodule WorkDoneProgressBegin = Lsp.Types.WorkDoneProgressBeginmodule WorkDoneProgressCancelParams = Lsp.Types.WorkDoneProgressCancelParamsmodule WorkDoneProgressCreateParams = Lsp.Types.WorkDoneProgressCreateParamsmodule WorkDoneProgressEnd = Lsp.Types.WorkDoneProgressEndmodule WorkDoneProgressOptions = Lsp.Types.WorkDoneProgressOptionsmodule WorkDoneProgressParams = Lsp.Types.WorkDoneProgressParamsmodule WorkDoneProgressReport = Lsp.Types.WorkDoneProgressReportmodule WorkspaceDiagnosticParams = Lsp.Types.WorkspaceDiagnosticParamsmodule WorkspaceUnchangedDocumentDiagnosticReport =
- Lsp.Types.WorkspaceUnchangedDocumentDiagnosticReportmodule WorkspaceFullDocumentDiagnosticReport =
- Lsp.Types.WorkspaceFullDocumentDiagnosticReportmodule WorkspaceDocumentDiagnosticReport =
- Lsp.Types.WorkspaceDocumentDiagnosticReportmodule WorkspaceDiagnosticReport = Lsp.Types.WorkspaceDiagnosticReportmodule WorkspaceDiagnosticReportPartialResult =
- Lsp.Types.WorkspaceDiagnosticReportPartialResultmodule WorkspaceFoldersInitializeParams =
- Lsp.Types.WorkspaceFoldersInitializeParamsmodule WorkspaceSymbol = Lsp.Types.WorkspaceSymbolmodule WorkspaceSymbolParams = Lsp.Types.WorkspaceSymbolParamsmodule WorkspaceSymbolRegistrationOptions =
- Lsp.Types.WorkspaceSymbolRegistrationOptionsmodule CodeActionResult = Lsp.Types.CodeActionResultmodule Locations = Lsp.Types.Locationsinclude module type of struct include IO_lwt endtype 'a t = 'a Lwt.tval return : 'a -> 'a tval failwith : string -> 'a ttype in_channel = Lwt_io.input Lwt_io.channeltype out_channel = Lwt_io.output Lwt_io.channelval stdin : in_channelval stdout : out_channelval read : in_channel -> bytes -> int -> int -> unit tval read_line : in_channel -> string tval write : out_channel -> bytes -> int -> int -> unit tval write_string : out_channel -> string -> unit tval fail : exn -> unit ttype doc_state = Linol.Server.doc_statemodule Jsonrpc2 : sig ... endval run : 'a Lwt.t -> 'aLinol.Blocking_IOBlocking IO with a new thread for each spawn.
val return : 'a -> 'a tval failwith : string -> 'a ttype in_channel = in_channeltype out_channel = out_channelval stdin : in_channelval stdout : out_channelval read : in_channel -> bytes -> int -> int -> unit tval read_line : in_channel -> string tval write : out_channel -> bytes -> int -> int -> unit tval write_string : out_channel -> string -> unit tval fail : exn -> unit tval n_bytes_written : int Stdlib.Atomic.tval n_bytes_read : int Stdlib.Atomic.tMake.Req_idRequest ID.
The unique ID of a request, used by JSONRPC to map each request to its reply.
type t = Jsonrpc.Id.tval to_string : t -> stringString representation of the ID
Make.IOval return : 'a -> 'a tval failwith : string -> 'a tval stdin : in_channelval stdout : out_channelval read : in_channel -> bytes -> int -> int -> unit tval read_line : in_channel -> string tval write : out_channel -> bytes -> int -> int -> unit tval write_string : out_channel -> string -> unit tval fail : exn -> unit tMake.base_servermethod on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- Lsp.Client_notification.t ->
- unit IO.tmethod on_request : 'a. notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- id:Req_id.t ->
- 'a Lsp.Client_request.t ->
- 'a IO.tmethod spawn_query_handler : (unit -> unit IO.t) -> unitMake.notify_backval mutable uri : Lsp.Types.DocumentUri.t optionmethod cancel_request : Jsonrpc.Id.t -> unit IO.tmethod get_uri : Lsp.Types.DocumentUri.t optionmethod send_diagnostic : Diagnostic.t list -> unit IO.tmethod send_log_msg : type_:Lsp__Types.MessageType.t -> string -> unit IO.tmethod send_notification : Lsp.Server_notification.t -> unit IO.tmethod send_request : 'from_server. 'from_server Lsp.Server_request.t ->
- (('from_server, Jsonrpc.Response.Error.t) result -> unit IO.t) ->
- Req_id.t IO.tmethod set_uri : Lsp.Types.DocumentUri.t -> unitmethod telemetry : Lsp__.Import.Json.t -> unit IO.tmethod work_done_progress_begin : Lsp.Types.WorkDoneProgressBegin.t ->
- unit IO.tmethod work_done_progress_end : Lsp.Types.WorkDoneProgressEnd.t -> unit IO.tmethod work_done_progress_report : Lsp.Types.WorkDoneProgressReport.t ->
- unit IO.tMake.serverval docs : (Lsp.Types.DocumentUri.t, doc_state) Hashtbl.tmethod config_code_action_provider : [ `Bool of bool
- | `CodeActionOptions of
- Lsp.Types.CodeActionOptions.t ]method config_code_lens_options : Lsp.Types.CodeLensOptions.t optionmethod config_completion : Lsp.Types.CompletionOptions.t optionmethod config_definition : [ `Bool of bool
- | `DefinitionOptions of
- Lsp.Types.DefinitionOptions.t ]
- optionmethod config_hover : [ `Bool of bool
- | `HoverOptions of Lsp.Types.HoverOptions.t ]
- optionmethod config_modify_capabilities : Lsp.Types.ServerCapabilities.t ->
- Lsp.Types.ServerCapabilities.tmethod config_symbol : [ `Bool of bool
- | `DocumentSymbolOptions of
- Lsp.Types.DocumentSymbolOptions.t ]
- optionmethod config_sync_opts : Lsp.Types.TextDocumentSyncOptions.tmethod find_doc : Lsp.Types.DocumentUri.t -> doc_state optionmethod on_notif_doc_did_change : notify_back:notify_back ->
- Lsp.Types.VersionedTextDocumentIdentifier.t ->
- Lsp.Types.TextDocumentContentChangeEvent.t list ->
- old_content:string ->
- new_content:string ->
- unit IO.tmethod on_notif_doc_did_close : notify_back:notify_back ->
- Lsp.Types.TextDocumentIdentifier.t ->
- unit IO.tmethod on_notif_doc_did_open : notify_back:notify_back ->
- Lsp.Types.TextDocumentItem.t ->
- content:string ->
- unit IO.tmethod on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- Lsp.Client_notification.t ->
- unit IO.tmethod on_notification_unhandled : notify_back:notify_back ->
- Lsp.Client_notification.t ->
- unit IO.tmethod on_req_code_action : notify_back:notify_back ->
- id:Req_id.t ->
- Lsp.Types.CodeActionParams.t ->
- Lsp.Types.CodeActionResult.t IO.tmethod on_req_code_lens : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.CodeLens.t list IO.tmethod on_req_code_lens_resolve : notify_back:notify_back ->
- id:Req_id.t ->
- Lsp.Types.CodeLens.t ->
- Lsp.Types.CodeLens.t IO.tmethod on_req_completion : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- ctx:Lsp__Types.CompletionContext.t option ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- [ `CompletionList of Lsp__.Types.CompletionList.t
- | `List of Lsp__.Types.CompletionItem.t list ]
- option
- IO.tmethod on_req_definition : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.Locations.t option IO.tmethod on_req_execute_command : notify_back:notify_back ->
- id:Req_id.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- string ->
- Yojson.Safe.t list option ->
- Yojson.Safe.t IO.tmethod on_req_hover : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.Hover.t option IO.tmethod on_req_initialize : notify_back:notify_back ->
- Lsp.Types.InitializeParams.t ->
- Lsp.Types.InitializeResult.t IO.tmethod on_req_inlay_hint : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- range:Lsp.Types.Range.t ->
- unit ->
- Lsp.Types.InlayHint.t list option IO.tmethod on_req_symbol : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- unit ->
- [ `DocumentSymbol of Lsp__.Types.DocumentSymbol.t list
- | `SymbolInformation of Lsp__.Types.SymbolInformation.t list ]
- option
- IO.tmethod on_request : 'a. notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- id:Req_id.t ->
- 'a Lsp.Client_request.t ->
- 'a IO.tmethod on_request_unhandled : 'r. notify_back:notify_back ->
- id:Req_id.t ->
- 'r Lsp.Client_request.t ->
- 'r IO.tmethod on_unknown_notification : notify_back:notify_back ->
- Jsonrpc.Notification.t ->
- unit IO.tmethod on_unknown_request : notify_back:notify_back ->
- server_request:(server_request_handler_pair -> Req_id.t IO.t) ->
- id:Req_id.t ->
- string ->
- Jsonrpc.Structured.t option ->
- Yojson.Safe.t IO.tmethod spawn_query_handler : (unit -> unit IO.t) -> unitJsonrpc2.Makemodule IO = IOinclude sig ... endmodule Position = Lsp.Types.Positionmodule Range = Lsp.Types.Rangemodule Diagnostic = Lsp.Types.Diagnosticmodule DiagnosticSeverity = Lsp.Types.DiagnosticSeveritymodule Req_id : sig ... endtype server_request_handler_pair = | Request_and_handler : 'from_server Lsp.Server_request.t
- * (('from_server, Jsonrpc.Response.Error.t) result ->
- unit IO.t) -> server_request_handler_pairtype send_request = server_request_handler_pair -> Req_id.t IO.tclass virtual base_server : object ... endval async : base_server -> (unit -> unit IO.t) -> unit IO.tclass notify_back : notify_back:(Lsp.Server_notification.t ->
- unit IO.t) -> server_request:(server_request_handler_pair ->
- Req_id.t IO.t) -> workDoneToken:[ `Int of int | `String of string ] option -> partialResultToken:'a -> ?version:
- int -> ?uri:Lsp.Types.DocumentUri.t -> unit -> object ... endtype nonrec doc_state = {uri : Lsp.Types.DocumentUri.t;languageId : string;version : int;content : string;}class virtual server : object ... endval create : ic:IO.in_channel -> oc:IO.out_channel -> server -> tCreate a connection from the pair of channels
val send_server_notification : t -> Lsp.Server_notification.t -> unit IO.tSend a notification from the server.
val send_server_request :
- t ->
- 'from_server Lsp.Server_request.t ->
- (('from_server, Jsonrpc.Response.Error.t) result -> unit IO.t) ->
- Req_id.t IO.tSend a request from the server, and pass a callback that will be called with the result in the future.
Linol.Jsonrpc2Simple JSON-RPC2 implementation.
See the spec
Jsonrpc2.IOval return : 'a -> 'a tval failwith : string -> 'a tval stdin : in_channelval stdout : out_channelval read : in_channel -> bytes -> int -> int -> unit tval read_line : in_channel -> string tval write : out_channel -> bytes -> int -> int -> unit tval write_string : out_channel -> string -> unit tval fail : exn -> unit tS.IOval return : 'a -> 'a tval failwith : string -> 'a tval stdin : in_channelval stdout : out_channelval read : in_channel -> bytes -> int -> int -> unit tval read_line : in_channel -> string tval write : out_channel -> bytes -> int -> int -> unit tval write_string : out_channel -> string -> unit tval fail : exn -> unit tS.Req_idRequest ID.
The unique ID of a request, used by JSONRPC to map each request to its reply.
type t = Jsonrpc.Id.tval to_string : t -> stringString representation of the ID
S.base_servermethod on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- Lsp.Client_notification.t ->
- unit IO.tmethod on_request : 'a. notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- id:Req_id.t ->
- 'a Lsp.Client_request.t ->
- 'a IO.tmethod spawn_query_handler : (unit -> unit IO.t) -> unitS.notify_backval mutable uri : Lsp.Types.DocumentUri.t optionmethod cancel_request : Jsonrpc.Id.t -> unit IO.tmethod get_uri : Lsp.Types.DocumentUri.t optionmethod send_diagnostic : Diagnostic.t list -> unit IO.tmethod send_log_msg : type_:Lsp__Types.MessageType.t -> string -> unit IO.tmethod send_notification : Lsp.Server_notification.t -> unit IO.tmethod send_request : 'from_server. 'from_server Lsp.Server_request.t ->
- (('from_server, Jsonrpc.Response.Error.t) result -> unit IO.t) ->
- Req_id.t IO.tmethod set_uri : Lsp.Types.DocumentUri.t -> unitmethod telemetry : Lsp__.Import.Json.t -> unit IO.tmethod work_done_progress_begin : Lsp.Types.WorkDoneProgressBegin.t ->
- unit IO.tmethod work_done_progress_end : Lsp.Types.WorkDoneProgressEnd.t -> unit IO.tmethod work_done_progress_report : Lsp.Types.WorkDoneProgressReport.t ->
- unit IO.tS.serverval docs : (Lsp.Types.DocumentUri.t, doc_state) Hashtbl.tmethod config_code_action_provider : [ `Bool of bool
- | `CodeActionOptions of
- Lsp.Types.CodeActionOptions.t ]method config_code_lens_options : Lsp.Types.CodeLensOptions.t optionmethod config_completion : Lsp.Types.CompletionOptions.t optionmethod config_definition : [ `Bool of bool
- | `DefinitionOptions of
- Lsp.Types.DefinitionOptions.t ]
- optionmethod config_hover : [ `Bool of bool
- | `HoverOptions of Lsp.Types.HoverOptions.t ]
- optionmethod config_modify_capabilities : Lsp.Types.ServerCapabilities.t ->
- Lsp.Types.ServerCapabilities.tmethod config_symbol : [ `Bool of bool
- | `DocumentSymbolOptions of
- Lsp.Types.DocumentSymbolOptions.t ]
- optionmethod config_sync_opts : Lsp.Types.TextDocumentSyncOptions.tmethod find_doc : Lsp.Types.DocumentUri.t -> doc_state optionmethod on_notif_doc_did_change : notify_back:notify_back ->
- Lsp.Types.VersionedTextDocumentIdentifier.t ->
- Lsp.Types.TextDocumentContentChangeEvent.t list ->
- old_content:string ->
- new_content:string ->
- unit IO.tmethod on_notif_doc_did_close : notify_back:notify_back ->
- Lsp.Types.TextDocumentIdentifier.t ->
- unit IO.tmethod on_notif_doc_did_open : notify_back:notify_back ->
- Lsp.Types.TextDocumentItem.t ->
- content:string ->
- unit IO.tmethod on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- Lsp.Client_notification.t ->
- unit IO.tmethod on_notification_unhandled : notify_back:notify_back ->
- Lsp.Client_notification.t ->
- unit IO.tmethod on_req_code_action : notify_back:notify_back ->
- id:Req_id.t ->
- Lsp.Types.CodeActionParams.t ->
- Lsp.Types.CodeActionResult.t IO.tmethod on_req_code_lens : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.CodeLens.t list IO.tmethod on_req_code_lens_resolve : notify_back:notify_back ->
- id:Req_id.t ->
- Lsp.Types.CodeLens.t ->
- Lsp.Types.CodeLens.t IO.tmethod on_req_completion : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- ctx:Lsp__Types.CompletionContext.t option ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- [ `CompletionList of Lsp__.Types.CompletionList.t
- | `List of Lsp__.Types.CompletionItem.t list ]
- option
- IO.tmethod on_req_definition : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.Locations.t option IO.tmethod on_req_execute_command : notify_back:notify_back ->
- id:Req_id.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- string ->
- Yojson.Safe.t list option ->
- Yojson.Safe.t IO.tmethod on_req_hover : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.Hover.t option IO.tmethod on_req_initialize : notify_back:notify_back ->
- Lsp.Types.InitializeParams.t ->
- Lsp.Types.InitializeResult.t IO.tmethod on_req_inlay_hint : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- range:Lsp.Types.Range.t ->
- unit ->
- Lsp.Types.InlayHint.t list option IO.tmethod on_req_symbol : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- unit ->
- [ `DocumentSymbol of Lsp__.Types.DocumentSymbol.t list
- | `SymbolInformation of Lsp__.Types.SymbolInformation.t list ]
- option
- IO.tmethod on_request : 'a. notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- id:Req_id.t ->
- 'a Lsp.Client_request.t ->
- 'a IO.tmethod on_request_unhandled : 'r. notify_back:notify_back ->
- id:Req_id.t ->
- 'r Lsp.Client_request.t ->
- 'r IO.tmethod on_unknown_notification : notify_back:notify_back ->
- Jsonrpc.Notification.t ->
- unit IO.tmethod on_unknown_request : notify_back:notify_back ->
- server_request:(server_request_handler_pair -> Req_id.t IO.t) ->
- id:Req_id.t ->
- string ->
- Jsonrpc.Structured.t option ->
- Yojson.Safe.t IO.tmethod spawn_query_handler : (unit -> unit IO.t) -> unitJsonrpc2.Sinclude sig ... endmodule Position = Lsp.Types.Positionmodule Range = Lsp.Types.Rangemodule Diagnostic = Lsp.Types.Diagnosticmodule DiagnosticSeverity = Lsp.Types.DiagnosticSeveritymodule Req_id : sig ... endtype server_request_handler_pair = | Request_and_handler : 'from_server Lsp.Server_request.t
- * (('from_server, Jsonrpc.Response.Error.t) result ->
- unit IO.t) -> server_request_handler_pairtype send_request = server_request_handler_pair -> Req_id.t IO.tclass virtual base_server : object ... endval async : base_server -> (unit -> unit IO.t) -> unit IO.tclass notify_back : notify_back:(Lsp.Server_notification.t ->
- unit IO.t) -> server_request:(server_request_handler_pair ->
- Req_id.t IO.t) -> workDoneToken:[ `Int of int | `String of string ] option -> partialResultToken:'a -> ?version:
- int -> ?uri:Lsp.Types.DocumentUri.t -> unit -> object ... endtype nonrec doc_state = {uri : Lsp.Types.DocumentUri.t;languageId : string;version : int;content : string;}class virtual server : object ... endval create : ic:IO.in_channel -> oc:IO.out_channel -> server -> tCreate a connection from the pair of channels
val send_server_notification : t -> Lsp.Server_notification.t -> unit IO.tSend a notification from the server.
val send_server_request :
- t ->
- 'from_server Lsp.Server_request.t ->
- (('from_server, Jsonrpc.Response.Error.t) result -> unit IO.t) ->
- Req_id.t IO.tSend a request from the server, and pass a callback that will be called with the result in the future.
Make.IOval return : 'a -> 'a tval failwith : string -> 'a tval stdin : in_channelval stdout : out_channelval read : in_channel -> bytes -> int -> int -> unit tval read_line : in_channel -> string tval write : out_channel -> bytes -> int -> int -> unit tval write_string : out_channel -> string -> unit tval fail : exn -> unit tMake.base_serverThe server baseclass
method virtual on_notification : notify_back:
- (Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- Lsp.Client_notification.t ->
- unit IO.tmethod virtual on_request : 'a. notify_back:
- (Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- id:Req_id.t ->
- 'a Lsp.Client_request.t ->
- 'a IO.tMethod called to handle client requests.
method virtual spawn_query_handler : (unit -> unit IO.t) -> unitHow to start a new future/task/thread concurrently. This is used to process incoming user queries.
Make.notify_backA wrapper to more easily reply to notifications
val mutable uri : Lsp.Types.DocumentUri.t optionmethod set_uri : Lsp.Types.DocumentUri.t -> unitmethod get_uri : Lsp.Types.DocumentUri.t optionmethod send_log_msg : type_:Lsp__Types.MessageType.t -> string -> unit IO.tSend a log message to the editor
method send_diagnostic : Diagnostic.t list -> unit IO.tSend diagnostics for the current document
method telemetry : Lsp__.Import.Json.t -> unit IO.tmethod cancel_request : Jsonrpc.Id.t -> unit IO.tmethod work_done_progress_begin : Lsp.Types.WorkDoneProgressBegin.t ->
- unit IO.tmethod work_done_progress_report : Lsp.Types.WorkDoneProgressReport.t ->
- unit IO.tmethod work_done_progress_end : Lsp.Types.WorkDoneProgressEnd.t -> unit IO.tmethod send_notification : Lsp.Server_notification.t -> unit IO.tSend a notification from the server to the client (general purpose method)
method send_request : 'from_server. 'from_server Lsp.Server_request.t ->
- (('from_server, Jsonrpc.Response.Error.t) result -> unit IO.t) ->
- Req_id.t IO.tSend a request from the server to the client (general purpose method)
Make.serverAn easily overloadable class. Pick the methods you want to support. The user must provide at least the callbacks for document lifecycle: open, close, update. The most basic LSP server should check documents when they're updated and report diagnostics back to the editor.
inherit base_serverval docs : (Lsp.Types.DocumentUri.t, doc_state) Hashtbl.tCheck if exit or shutdown request was made by the client.
method find_doc : Lsp.Types.DocumentUri.t -> doc_state optionFind current state of the given document, if present.
method on_request_unhandled : 'r. notify_back:notify_back ->
- id:Req_id.t ->
- 'r Lsp.Client_request.t ->
- 'r IO.tOverride to process other requests
method config_sync_opts : Lsp.Types.TextDocumentSyncOptions.tParameter for how to synchronize content with the editor
method config_completion : Lsp.Types.CompletionOptions.t optionConfiguration for the completion API.
method config_code_lens_options : Lsp.Types.CodeLensOptions.t optionmethod config_definition : [ `Bool of bool
- | `DefinitionOptions of
- Lsp.Types.DefinitionOptions.t ]
- optionmethod config_hover : [ `Bool of bool
- | `HoverOptions of Lsp.Types.HoverOptions.t ]
- optionmethod config_symbol : [ `Bool of bool
- | `DocumentSymbolOptions of
- Lsp.Types.DocumentSymbolOptions.t ]
- optionmethod config_code_action_provider : [ `Bool of bool
- | `CodeActionOptions of
- Lsp.Types.CodeActionOptions.t ]method config_modify_capabilities : Lsp.Types.ServerCapabilities.t ->
- Lsp.Types.ServerCapabilities.tModify capabilities before sending them back to the client. By default we just return them unmodified.
method on_req_initialize : notify_back:notify_back ->
- Lsp.Types.InitializeParams.t ->
- Lsp.Types.InitializeResult.t IO.tmethod on_req_hover : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.Hover.t option IO.tCalled when the user hovers on some identifier in the document
method on_req_completion : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- ctx:Lsp__Types.CompletionContext.t option ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- [ `CompletionList of Lsp__.Types.CompletionList.t
- | `List of Lsp__.Types.CompletionItem.t list ]
- option
- IO.tCalled when the user requests completion in the document
method on_req_definition : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- pos:Lsp__Types.Position.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.Locations.t option IO.tCalled when the user wants to jump-to-definition
method on_req_code_lens : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- doc_state ->
- Lsp.Types.CodeLens.t list IO.tList code lenses for the given document
method on_req_code_lens_resolve : notify_back:notify_back ->
- id:Req_id.t ->
- Lsp.Types.CodeLens.t ->
- Lsp.Types.CodeLens.t IO.tCode lens resolution, must return a code lens with non null "command"
method on_req_code_action : notify_back:notify_back ->
- id:Req_id.t ->
- Lsp.Types.CodeActionParams.t ->
- Lsp.Types.CodeActionResult.t IO.tCode action.
method on_req_execute_command : notify_back:notify_back ->
- id:Req_id.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- string ->
- Yojson.Safe.t list option ->
- Yojson.Safe.t IO.tExecute a command with given arguments.
method on_req_symbol : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- workDoneToken:Lsp__Types.ProgressToken.t option ->
- partialResultToken:Lsp__Types.ProgressToken.t option ->
- unit ->
- [ `DocumentSymbol of Lsp__.Types.DocumentSymbol.t list
- | `SymbolInformation of Lsp__.Types.SymbolInformation.t list ]
- option
- IO.tList symbols in this document.
method on_unknown_request : notify_back:notify_back ->
- server_request:(server_request_handler_pair -> Req_id.t IO.t) ->
- id:Req_id.t ->
- string ->
- Jsonrpc.Structured.t option ->
- Yojson.Safe.t IO.tmethod on_req_inlay_hint : notify_back:notify_back ->
- id:Req_id.t ->
- uri:Lsp__Types.DocumentUri.t ->
- range:Lsp.Types.Range.t ->
- unit ->
- Lsp.Types.InlayHint.t list option IO.tProvide inlay hints for this document.
method on_request : 'a. notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- id:Req_id.t ->
- 'a Lsp.Client_request.t ->
- 'a IO.tmethod virtual on_notif_doc_did_open : notify_back:notify_back ->
- Lsp.Types.TextDocumentItem.t ->
- content:string ->
- unit IO.tCalled when a document is opened
method virtual on_notif_doc_did_close : notify_back:notify_back ->
- Lsp.Types.TextDocumentIdentifier.t ->
- unit IO.tmethod virtual on_notif_doc_did_change : notify_back:notify_back ->
- Lsp.Types.VersionedTextDocumentIdentifier.t ->
- Lsp.Types.TextDocumentContentChangeEvent.t list ->
- old_content:string ->
- new_content:string ->
- unit IO.tCalled when the document changes.
method on_unknown_notification : notify_back:notify_back ->
- Jsonrpc.Notification.t ->
- unit IO.tmethod on_notification_unhandled : notify_back:notify_back ->
- Lsp.Client_notification.t ->
- unit IO.tOverride to handle unprocessed notifications
method on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) ->
- server_request:send_request ->
- Lsp.Client_notification.t ->
- unit IO.tServer.MakeServer interface for some IO substrate.
module IO : sig ... endmodule Position = Lsp.Types.Positionmodule Range = Lsp.Types.Rangemodule Diagnostic = Lsp.Types.Diagnosticmodule DiagnosticSeverity = Lsp.Types.DiagnosticSeveritymodule Req_id = Req_idtype server_request_handler_pair = | Request_and_handler : 'from_server Lsp.Server_request.t
- * (('from_server, Jsonrpc.Response.Error.t) result ->
- unit IO.t) -> server_request_handler_pairA variant carrying a Lsp.Server_request.t and a handler for its return value. The request is stored in order to allow us to discriminate its existential variable.
type send_request = server_request_handler_pair -> Req_id.t IO.tThe type of the action that sends a request from the server to the client and handles its response.
class virtual base_server : object ... endThe server baseclass
val async : base_server -> (unit -> unit IO.t) -> unit IO.tclass notify_back : notify_back:(Lsp.Server_notification.t ->
- unit IO.t) -> server_request:(server_request_handler_pair ->
- Req_id.t IO.t) -> workDoneToken:[ `Int of int | `String of string ] option -> partialResultToken:'a -> ?version:
- int
- option -> ?uri:Lsp.Types.DocumentUri.t option -> unit -> object ... endA wrapper to more easily reply to notifications
type nonrec doc_state = doc_state = {uri : Lsp.Types.DocumentUri.t;languageId : string;version : int;content : string;}Current state of a document.
class virtual server : object ... endAn easily overloadable class. Pick the methods you want to support. The user must provide at least the callbacks for document lifecycle: open, close, update. The most basic LSP server should check documents when they're updated and report diagnostics back to the editor.
Server.Req_idRequest ID.
The unique ID of a request, used by JSONRPC to map each request to its reply.
type t = Jsonrpc.Id.tval to_string : t -> stringString representation of the ID
Linol.ServerServer interface
type nonrec doc_state = {uri : Lsp.Types.DocumentUri.t;languageId : string;version : int;content : string;}Current state of a document.
module Req_id : sig ... endRequest ID.
LinolLinol.
Abstraction over The "Lsp" library, to make it easier to develop LSP servers in OCaml (but not necessarily for OCaml).
module type IO = sig ... endmodule Jsonrpc2 : sig ... endSimple JSON-RPC2 implementation.
module Server : sig ... endServer interface
module Blocking_IO : sig ... endBlocking IO with a new thread for each spawn.
module Log = Logmodule Make = Jsonrpc2.Makeval logs_src : Logs.srcLinol.IOval return : 'a -> 'a tval failwith : string -> 'a tval stdin : in_channelval stdout : out_channelval read : in_channel -> bytes -> int -> int -> unit tval read_line : in_channel -> string tval write : out_channel -> bytes -> int -> int -> unit tval write_string : out_channel -> string -> unit tval fail : exn -> unit tLinol__This module is hidden.
Linol__Blocking_IOThis module is hidden.
Linol__Common_This module is hidden.
Linol__Jsonrpc2This module is hidden.
Linol__ServerThis module is hidden.
Linol__SigsThis module is hidden.
Linol Linol.Traceinclude module type of struct include Trace_core endUser defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = Trace_core.explicit_span = {span : span;Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.
mutable meta : Trace_core.Meta_map.t;Metadata for this span (and its context)
*)}Explicit span, with collector-specific metadata
module Collector = Trace_core.Collectormodule Meta_map = Trace_core.Meta_mapIs there a collector?
This is fast, so that the traced program can check it before creating any span or message.
val with_span :
- ?__FUNCTION__:string ->
- __FILE__:string ->
- __LINE__:int ->
- ?data:(unit -> (string * user_data) list) ->
- string ->
- (span -> 'a) ->
- 'awith_span ~__FILE__ ~__LINE__ name f enters a new span sp, and calls f sp. sp might be a dummy span if no collector is installed. When f sp returns or raises, the span sp is exited.
This is the recommended way to instrument most code.
NOTE an important restriction is that this is only supposed to work for synchronous, direct style code. Monadic concurrency, Effect-based fibers, etc. might not play well with this style of spans on some or all backends. If you use cooperative concurrency, see enter_manual_span.
val exit_span : span -> unitAdd structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.
val enter_manual_sub_span :
- parent:explicit_span ->
- ?flavor:[ `Sync | `Async ] ->
- ?__FUNCTION__:string ->
- __FILE__:string ->
- __LINE__:int ->
- ?data:(unit -> (string * user_data) list) ->
- string ->
- explicit_spanLike with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.
val enter_manual_toplevel_span :
- ?flavor:[ `Sync | `Async ] ->
- ?__FUNCTION__:string ->
- __FILE__:string ->
- __LINE__:int ->
- ?data:(unit -> (string * user_data) list) ->
- string ->
- explicit_spanLike with_span but the caller is responsible for carrying this explicit_span around until it's exited with exit_manual_span. The span can be used as a parent in enter_manual_sub_span.
val exit_manual_span : explicit_span -> unitExit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.
val add_data_to_manual_span :
- explicit_span ->
- (string * user_data) list ->
- unitadd_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.
message msg logs a message msg (if a collector is installed). Additional metadata can be provided.
val messagef :
- ?span:span ->
- ?data:(unit -> (string * user_data) list) ->
- ((('a, Stdlib.Format.formatter, unit, unit) format4 -> 'a) -> unit) ->
- unitmessagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.
Give a name to the current thread. This might be used by the collector to display traces in a more informative way.
Give a name to the current process. This might be used by the collector to display traces in a more informative way.
val counter_int :
- ?data:(unit -> (string * user_data) list) ->
- string ->
- int ->
- unitEmit a counter of type int. Counters represent the evolution of some quantity over time.
val counter_float :
- ?data:(unit -> (string * user_data) list) ->
- string ->
- float ->
- unitEmit a counter of type float. See counter_int for more details.
type collector = (module Collector.S)An event collector.
See Collector for more details.
val setup_collector : collector -> unitsetup_collector c installs c as the current collector.
Trace_core.CollectorA global collector.
The collector, if present, is responsible for collecting messages and spans, and storing them, recording them, forward them, or offering them to other services and processes.
module type S = sig ... endSignature for a collector.
Collector.SSignature for a collector.
This is only relevant to implementors of tracing backends; to instrument your code you only need to look at the Trace module.
val with_span :
- __FUNCTION__:string option ->
- __FILE__:string ->
- __LINE__:int ->
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- (int64 -> 'a) ->
- 'aRun the function in a new span.
This replaces the previous enter_span and exit_span which were too flexible to be efficient to implement in async contexts.
val enter_span :
- __FUNCTION__:string option ->
- __FILE__:string ->
- __LINE__:int ->
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- int64Enter a new implicit span. For many uses cases, with_span will be easier to use.
Exit span. This should be called on the same thread as the corresponding enter_span, and nest properly with other calls to enter/exit_span and with_span.
val enter_manual_span :
- parent:Trace_core__.Types.explicit_span option ->
- flavor:[ `Sync | `Async ] option ->
- __FUNCTION__:string option ->
- __FILE__:string ->
- __LINE__:int ->
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- Trace_core__.Types.explicit_spanEnter an explicit span. Surrounding scope, if any, is provided by parent, and this function can store as much metadata as it wants in the hmap in the explicit_span's meta field.
This means that the collector doesn't need to implement contextual storage mapping span to scopes, metadata, etc. on its side; everything can be transmitted in the explicit_span.
val add_data_to_span :
- int64 ->
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- unit0.4
val add_data_to_manual_span :
- Trace_core__.Types.explicit_span ->
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- unitAdds data to the given span.
val message :
- ?span:int64 ->
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- unitEmit a message with associated metadata.
val counter_int :
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- int ->
- unitInteger counter.
Meta_map.KeyKeys with a type witness.
A key of type 'a t is used to access the portion of the map or table that associates keys of type 'a to values.
val create : unit -> 'a tMake a new key. This is generative, so calling create () twice with the same return type will produce incompatible keys that cannot see each other's bindings.
Trace_core.Meta_mapAssociative containers with Heterogeneous Values
module Key : sig ... endKeys with a type witness.
Immutable map from Key.t to values
val empty : tval length : t -> intval cardinal : t -> intTrace_coreTrace.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = {span : span;Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.
mutable meta : Meta_map.t;Metadata for this span (and its context)
*)}Explicit span, with collector-specific metadata
module Collector : sig ... endA global collector.
module Meta_map : sig ... endAssociative containers with Heterogeneous Values
Is there a collector?
This is fast, so that the traced program can check it before creating any span or message.
val with_span :
- ?__FUNCTION__:string ->
- __FILE__:string ->
- __LINE__:int ->
- ?data:(unit -> (string * user_data) list) ->
- string ->
- (span -> 'a) ->
- 'awith_span ~__FILE__ ~__LINE__ name f enters a new span sp, and calls f sp. sp might be a dummy span if no collector is installed. When f sp returns or raises, the span sp is exited.
This is the recommended way to instrument most code.
NOTE an important restriction is that this is only supposed to work for synchronous, direct style code. Monadic concurrency, Effect-based fibers, etc. might not play well with this style of spans on some or all backends. If you use cooperative concurrency, see enter_manual_span.
val exit_span : span -> unitAdd structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.
val enter_manual_sub_span :
- parent:explicit_span ->
- ?flavor:[ `Sync | `Async ] ->
- ?__FUNCTION__:string ->
- __FILE__:string ->
- __LINE__:int ->
- ?data:(unit -> (string * user_data) list) ->
- string ->
- explicit_spanLike with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.
val enter_manual_toplevel_span :
- ?flavor:[ `Sync | `Async ] ->
- ?__FUNCTION__:string ->
- __FILE__:string ->
- __LINE__:int ->
- ?data:(unit -> (string * user_data) list) ->
- string ->
- explicit_spanLike with_span but the caller is responsible for carrying this explicit_span around until it's exited with exit_manual_span. The span can be used as a parent in enter_manual_sub_span.
val exit_manual_span : explicit_span -> unitExit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.
val add_data_to_manual_span :
- explicit_span ->
- (string * user_data) list ->
- unitadd_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.
message msg logs a message msg (if a collector is installed). Additional metadata can be provided.
val messagef :
- ?span:span ->
- ?data:(unit -> (string * user_data) list) ->
- ((('a, Stdlib.Format.formatter, unit, unit) format4 -> 'a) -> unit) ->
- unitmessagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.
Give a name to the current thread. This might be used by the collector to display traces in a more informative way.
Give a name to the current process. This might be used by the collector to display traces in a more informative way.
val counter_int :
- ?data:(unit -> (string * user_data) list) ->
- string ->
- int ->
- unitEmit a counter of type int. Counters represent the evolution of some quantity over time.
val counter_float :
- ?data:(unit -> (string * user_data) list) ->
- string ->
- float ->
- unitEmit a counter of type float. See counter_int for more details.
type collector = (module Collector.S)An event collector.
See Collector for more details.
val setup_collector : collector -> unitsetup_collector c installs c as the current collector.
Trace_core__This module is hidden.
Trace_core__Atomic_This module is hidden.
Trace_core__CollectorThis module is hidden.
Trace_core__Meta_mapThis module is hidden.
Trace_core__TypesThis module is hidden.
Trace Trace_core Trace.