diff --git a/index.html b/index.html index 873180a0..b4347b19 100644 --- a/index.html +++ b/index.html @@ -1,2 +1,2 @@ -_opam

OCaml package documentation

Browse by name, by tag, the standard library and the OCaml manual (online, latest version).

Generated for /home/runner/work/linol/linol/_opam/lib

Packages by name

c

  1. cmdliner

f

  1. fmt

j

  1. jsonrpc

l

  1. linol
  2. linol-lwt
  3. logs
  4. lsp
  5. lwt

o

  1. ocaml

p

  1. ppx_yojson_conv_lib

t

  1. trace

u

  1. uutf

y

  1. yojson

Packages by tag

\ No newline at end of file +_opam

OCaml package documentation

Browse by name, by tag, the standard library and the OCaml manual (online, latest version).

Generated for /home/runner/work/linol/linol/_opam/lib

Packages by name

c

  1. cmdliner

f

  1. fmt

j

  1. jsonrpc

l

  1. logs
  2. lsp
  3. lwt

o

  1. ocaml

p

  1. ppx_yojson_conv_lib

u

  1. uutf

y

  1. yojson

Packages by tag

\ No newline at end of file diff --git a/linol-lwt/Linol_lwt/IO_lwt/index.html b/linol-lwt/Linol_lwt/IO_lwt/index.html deleted file mode 100644 index 5b5bea67..00000000 --- a/linol-lwt/Linol_lwt/IO_lwt/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -IO_lwt (linol-lwt.Linol_lwt.IO_lwt)

Module Linol_lwt.IO_lwt

type 'a t = 'a Lwt.t
val return : 'a -> 'a t
val failwith : string -> 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
type in_channel = Lwt_io.input Lwt_io.channel
type out_channel = Lwt_io.output Lwt_io.channel
val stdin : in_channel
val stdout : out_channel
val read : in_channel -> bytes -> int -> int -> unit t
val read_line : in_channel -> string t
val write : out_channel -> bytes -> int -> int -> unit t
val write_string : out_channel -> string -> unit t
val fail : exn -> unit t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
diff --git a/linol-lwt/Linol_lwt/Jsonrpc2/IO/index.html b/linol-lwt/Linol_lwt/Jsonrpc2/IO/index.html deleted file mode 100644 index 0f8d3ae8..00000000 --- a/linol-lwt/Linol_lwt/Jsonrpc2/IO/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -IO (linol-lwt.Linol_lwt.Jsonrpc2.IO)

Module Jsonrpc2.IO

type 'a t = 'a IO_lwt.t
val return : 'a -> 'a t
val failwith : string -> 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
type in_channel = IO_lwt.in_channel
type out_channel = IO_lwt.out_channel
val stdin : in_channel
val stdout : out_channel
val read : in_channel -> bytes -> int -> int -> unit t
val read_line : in_channel -> string t
val write : out_channel -> bytes -> int -> int -> unit t
val write_string : out_channel -> string -> unit t
val fail : exn -> unit t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
diff --git a/linol-lwt/Linol_lwt/Jsonrpc2/Req_id/index.html b/linol-lwt/Linol_lwt/Jsonrpc2/Req_id/index.html deleted file mode 100644 index e27f4243..00000000 --- a/linol-lwt/Linol_lwt/Jsonrpc2/Req_id/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Req_id (linol-lwt.Linol_lwt.Jsonrpc2.Req_id)

Module Jsonrpc2.Req_id

Request ID.

The unique ID of a request, used by JSONRPC to map each request to its reply.

type t = Jsonrpc.Id.t
val to_string : t -> string

String representation of the ID

diff --git a/linol-lwt/Linol_lwt/Jsonrpc2/class-base_server/index.html b/linol-lwt/Linol_lwt/Jsonrpc2/class-base_server/index.html deleted file mode 100644 index 0f7b6862..00000000 --- a/linol-lwt/Linol_lwt/Jsonrpc2/class-base_server/index.html +++ /dev/null @@ -1,9 +0,0 @@ - -base_server (linol-lwt.Linol_lwt.Jsonrpc2.base_server)

Class Jsonrpc2.base_server

method must_quit : bool
method on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) -> - server_request:send_request -> - Lsp.Client_notification.t -> - unit IO.t
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.t
method spawn_query_handler : (unit -> unit IO.t) -> unit
diff --git a/linol-lwt/Linol_lwt/Jsonrpc2/class-notify_back/index.html b/linol-lwt/Linol_lwt/Jsonrpc2/class-notify_back/index.html deleted file mode 100644 index 920861fc..00000000 --- a/linol-lwt/Linol_lwt/Jsonrpc2/class-notify_back/index.html +++ /dev/null @@ -1,6 +0,0 @@ - -notify_back (linol-lwt.Linol_lwt.Jsonrpc2.notify_back)

Class Jsonrpc2.notify_back

val mutable uri : Lsp.Types.DocumentUri.t option
method cancel_request : Jsonrpc.Id.t -> unit IO.t
method get_uri : Lsp.Types.DocumentUri.t option
method send_diagnostic : Diagnostic.t list -> unit IO.t
method send_log_msg : type_:Lsp__Types.MessageType.t -> string -> unit IO.t
method send_notification : Lsp.Server_notification.t -> unit IO.t
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.t
method set_uri : Lsp.Types.DocumentUri.t -> unit
method telemetry : Lsp__.Import.Json.t -> unit IO.t
method work_done_progress_begin : Lsp.Types.WorkDoneProgressBegin.t -> - unit IO.t
method work_done_progress_end : Lsp.Types.WorkDoneProgressEnd.t -> unit IO.t
method work_done_progress_report : Lsp.Types.WorkDoneProgressReport.t -> - unit IO.t
diff --git a/linol-lwt/Linol_lwt/Jsonrpc2/class-server/index.html b/linol-lwt/Linol_lwt/Jsonrpc2/class-server/index.html deleted file mode 100644 index a072db8a..00000000 --- a/linol-lwt/Linol_lwt/Jsonrpc2/class-server/index.html +++ /dev/null @@ -1,99 +0,0 @@ - -server (linol-lwt.Linol_lwt.Jsonrpc2.server)

Class Jsonrpc2.server

val mutable status : [ `ReceivedExit | `ReceivedShutdown | `Running ]
method config_code_action_provider : [ `Bool of bool - | `CodeActionOptions of - Lsp.Types.CodeActionOptions.t ]
method config_code_lens_options : Lsp.Types.CodeLensOptions.t option
method config_completion : Lsp.Types.CompletionOptions.t option
method config_definition : [ `Bool of bool - | `DefinitionOptions of - Lsp.Types.DefinitionOptions.t ] - option
method config_hover : [ `Bool of bool - | `HoverOptions of Lsp.Types.HoverOptions.t ] - option
method config_list_commands : string list
method config_modify_capabilities : Lsp.Types.ServerCapabilities.t -> - Lsp.Types.ServerCapabilities.t
method config_symbol : [ `Bool of bool - | `DocumentSymbolOptions of - Lsp.Types.DocumentSymbolOptions.t ] - option
method config_sync_opts : Lsp.Types.TextDocumentSyncOptions.t
method find_doc : Lsp.Types.DocumentUri.t -> doc_state option
method get_status : [ `ReceivedExit | `ReceivedShutdown | `Running ]
method must_quit : bool
method 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.t
method on_notif_doc_did_close : notify_back:notify_back -> - Lsp.Types.TextDocumentIdentifier.t -> - unit IO.t
method on_notif_doc_did_open : notify_back:notify_back -> - Lsp.Types.TextDocumentItem.t -> - content:string -> - unit IO.t
method on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) -> - server_request:send_request -> - Lsp.Client_notification.t -> - unit IO.t
method on_notification_unhandled : notify_back:notify_back -> - Lsp.Client_notification.t -> - unit IO.t
method on_req_code_action : notify_back:notify_back -> - id:Req_id.t -> - Lsp.Types.CodeActionParams.t -> - Lsp.Types.CodeActionResult.t IO.t
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.t
method on_req_code_lens_resolve : notify_back:notify_back -> - id:Req_id.t -> - Lsp.Types.CodeLens.t -> - Lsp.Types.CodeLens.t IO.t
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.t
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.t
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.t
method 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.t
method on_req_initialize : notify_back:notify_back -> - Lsp.Types.InitializeParams.t -> - Lsp.Types.InitializeResult.t IO.t
method 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.t
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.t
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.t
method on_request_unhandled : 'r. notify_back:notify_back -> - id:Req_id.t -> - 'r Lsp.Client_request.t -> - 'r IO.t
method on_unknown_notification : notify_back:notify_back -> - Jsonrpc.Notification.t -> - unit IO.t
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.t
method spawn_query_handler : (unit -> unit IO.t) -> unit
diff --git a/linol-lwt/Linol_lwt/Jsonrpc2/index.html b/linol-lwt/Linol_lwt/Jsonrpc2/index.html deleted file mode 100644 index b36f8732..00000000 --- a/linol-lwt/Linol_lwt/Jsonrpc2/index.html +++ /dev/null @@ -1,11 +0,0 @@ - -Jsonrpc2 (linol-lwt.Linol_lwt.Jsonrpc2)

Module Linol_lwt.Jsonrpc2

module IO : sig ... end
type t
module Position = Lsp.Types.Position
module Range = Lsp.Types.Range
module Diagnostic = Lsp.Types.Diagnostic
module DiagnosticSeverity = Lsp.Types.DiagnosticSeverity
module Req_id : sig ... end
type server_request_handler_pair =
  1. | Request_and_handler : 'from_server Lsp.Server_request.t - * (('from_server, Jsonrpc.Response.Error.t) result -> - unit IO.t) -> server_request_handler_pair
class virtual base_server : object ... end
val async : base_server -> (unit -> unit IO.t) -> unit IO.t
class 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 ... end
type nonrec doc_state = {
  1. uri : Lsp.Types.DocumentUri.t;
  2. languageId : string;
  3. version : int;
  4. content : string;
}
class virtual server : object ... end
val create : ic:IO.in_channel -> oc:IO.out_channel -> server -> t
val create_stdio : server -> t
val send_server_notification : t -> Lsp.Server_notification.t -> unit IO.t
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.t
val run : ?shutdown:(unit -> bool) -> t -> unit IO.t
diff --git a/linol-lwt/Linol_lwt/index.html b/linol-lwt/Linol_lwt/index.html deleted file mode 100644 index dd3771fe..00000000 --- a/linol-lwt/Linol_lwt/index.html +++ /dev/null @@ -1,94 +0,0 @@ - -Linol_lwt (linol-lwt.Linol_lwt)

Module Linol_lwt

module type IO = Linol.IO
module 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.channel
val spawn : (unit -> unit Lwt.t) -> unit

Spawn function.

  • since 0.5
include module type of struct include Lsp.Types end
module MarkedString = Lsp.Types.MarkedString
module DocumentUri = Lsp.Types.DocumentUri
module ProgressToken = Lsp.Types.ProgressToken
module ProgressParams = Lsp.Types.ProgressParams
module NotebookDocumentSyncOptions = Lsp.Types.NotebookDocumentSyncOptions
module NotebookDocumentSyncRegistrationOptions = - Lsp.Types.NotebookDocumentSyncRegistrationOptions
module NotebookDocumentFilter = Lsp.Types.NotebookDocumentFilter
module TextDocumentFilter = Lsp.Types.TextDocumentFilter
module SymbolTag = Lsp.Types.SymbolTag
module SymbolKind = Lsp.Types.SymbolKind
module ResourceOperationKind = Lsp.Types.ResourceOperationKind
module FailureHandlingKind = Lsp.Types.FailureHandlingKind
module MarkupKind = Lsp.Types.MarkupKind
module TokenFormat = Lsp.Types.TokenFormat
module PrepareSupportDefaultBehavior = Lsp.Types.PrepareSupportDefaultBehavior
module DiagnosticTag = Lsp.Types.DiagnosticTag
module FoldingRangeKind = Lsp.Types.FoldingRangeKind
module InsertTextMode = Lsp.Types.InsertTextMode
module CompletionItemKind = Lsp.Types.CompletionItemKind
module CompletionItemTag = Lsp.Types.CompletionItemTag
module CodeActionKind = Lsp.Types.CodeActionKind
module PositionEncodingKind = Lsp.Types.PositionEncodingKind
module DiagnosticSeverity = Lsp.Types.DiagnosticSeverity
module CodeActionTriggerKind = Lsp.Types.CodeActionTriggerKind
module CompletionTriggerKind = Lsp.Types.CompletionTriggerKind
module InsertTextFormat = Lsp.Types.InsertTextFormat
module NotebookCellKind = Lsp.Types.NotebookCellKind
module FileChangeType = Lsp.Types.FileChangeType
module WatchKind = Lsp.Types.WatchKind
module DocumentHighlightKind = Lsp.Types.DocumentHighlightKind
module FileOperationPatternKind = Lsp.Types.FileOperationPatternKind
module TraceValues = Lsp.Types.TraceValues
module TextDocumentSyncKind = Lsp.Types.TextDocumentSyncKind
module InlayHintKind = Lsp.Types.InlayHintKind
module MessageType = Lsp.Types.MessageType
module UniquenessLevel = Lsp.Types.UniquenessLevel
module MonikerKind = Lsp.Types.MonikerKind
module SemanticTokenModifiers = Lsp.Types.SemanticTokenModifiers
module SemanticTokenTypes = Lsp.Types.SemanticTokenTypes
module SignatureHelpTriggerKind = Lsp.Types.SignatureHelpTriggerKind
module TextDocumentSaveReason = Lsp.Types.TextDocumentSaveReason
module Position = Lsp.Types.Position
module Range = Lsp.Types.Range
module ChangeAnnotationIdentifier = Lsp.Types.ChangeAnnotationIdentifier
module AnnotatedTextEdit = Lsp.Types.AnnotatedTextEdit
module DeleteFileOptions = Lsp.Types.DeleteFileOptions
module DeleteFile = Lsp.Types.DeleteFile
module RenameFileOptions = Lsp.Types.RenameFileOptions
module RenameFile = Lsp.Types.RenameFile
module CreateFileOptions = Lsp.Types.CreateFileOptions
module CreateFile = Lsp.Types.CreateFile
module OptionalVersionedTextDocumentIdentifier = - Lsp.Types.OptionalVersionedTextDocumentIdentifier
module TextEdit = Lsp.Types.TextEdit
module TextDocumentEdit = Lsp.Types.TextDocumentEdit
module ChangeAnnotation = Lsp.Types.ChangeAnnotation
module WorkspaceEdit = Lsp.Types.WorkspaceEdit
module ApplyWorkspaceEditParams = Lsp.Types.ApplyWorkspaceEditParams
module ApplyWorkspaceEditResult = Lsp.Types.ApplyWorkspaceEditResult
module BaseSymbolInformation = Lsp.Types.BaseSymbolInformation
module CallHierarchyClientCapabilities = - Lsp.Types.CallHierarchyClientCapabilities
module CallHierarchyItem = Lsp.Types.CallHierarchyItem
module CallHierarchyIncomingCall = Lsp.Types.CallHierarchyIncomingCall
module CallHierarchyIncomingCallsParams = - Lsp.Types.CallHierarchyIncomingCallsParams
module CallHierarchyOptions = Lsp.Types.CallHierarchyOptions
module CallHierarchyOutgoingCall = Lsp.Types.CallHierarchyOutgoingCall
module CallHierarchyOutgoingCallsParams = - Lsp.Types.CallHierarchyOutgoingCallsParams
module TextDocumentIdentifier = Lsp.Types.TextDocumentIdentifier
module CallHierarchyPrepareParams = Lsp.Types.CallHierarchyPrepareParams
module NotebookCellTextDocumentFilter = - Lsp.Types.NotebookCellTextDocumentFilter
module DocumentFilter = Lsp.Types.DocumentFilter
module DocumentSelector = Lsp.Types.DocumentSelector
module CallHierarchyRegistrationOptions = - Lsp.Types.CallHierarchyRegistrationOptions
module CancelParams = Lsp.Types.CancelParams
module WorkspaceEditClientCapabilities = - Lsp.Types.WorkspaceEditClientCapabilities
module WorkspaceSymbolClientCapabilities = - Lsp.Types.WorkspaceSymbolClientCapabilities
module SemanticTokensWorkspaceClientCapabilities = - Lsp.Types.SemanticTokensWorkspaceClientCapabilities
module InlineValueWorkspaceClientCapabilities = - Lsp.Types.InlineValueWorkspaceClientCapabilities
module InlayHintWorkspaceClientCapabilities = - Lsp.Types.InlayHintWorkspaceClientCapabilities
module FileOperationClientCapabilities = - Lsp.Types.FileOperationClientCapabilities
module ExecuteCommandClientCapabilities = - Lsp.Types.ExecuteCommandClientCapabilities
module DidChangeWatchedFilesClientCapabilities = - Lsp.Types.DidChangeWatchedFilesClientCapabilities
module DidChangeConfigurationClientCapabilities = - Lsp.Types.DidChangeConfigurationClientCapabilities
module DiagnosticWorkspaceClientCapabilities = - Lsp.Types.DiagnosticWorkspaceClientCapabilities
module CodeLensWorkspaceClientCapabilities = - Lsp.Types.CodeLensWorkspaceClientCapabilities
module WorkspaceClientCapabilities = Lsp.Types.WorkspaceClientCapabilities
module ShowMessageRequestClientCapabilities = - Lsp.Types.ShowMessageRequestClientCapabilities
module ShowDocumentClientCapabilities = - Lsp.Types.ShowDocumentClientCapabilities
module WindowClientCapabilities = Lsp.Types.WindowClientCapabilities
module TypeHierarchyClientCapabilities = - Lsp.Types.TypeHierarchyClientCapabilities
module TypeDefinitionClientCapabilities = - Lsp.Types.TypeDefinitionClientCapabilities
module TextDocumentSyncClientCapabilities = - Lsp.Types.TextDocumentSyncClientCapabilities
module SignatureHelpClientCapabilities = - Lsp.Types.SignatureHelpClientCapabilities
module SemanticTokensClientCapabilities = - Lsp.Types.SemanticTokensClientCapabilities
module SelectionRangeClientCapabilities = - Lsp.Types.SelectionRangeClientCapabilities
module RenameClientCapabilities = Lsp.Types.RenameClientCapabilities
module ReferenceClientCapabilities = Lsp.Types.ReferenceClientCapabilities
module DocumentRangeFormattingClientCapabilities = - Lsp.Types.DocumentRangeFormattingClientCapabilities
module PublishDiagnosticsClientCapabilities = - Lsp.Types.PublishDiagnosticsClientCapabilities
module DocumentOnTypeFormattingClientCapabilities = - Lsp.Types.DocumentOnTypeFormattingClientCapabilities
module MonikerClientCapabilities = Lsp.Types.MonikerClientCapabilities
module LinkedEditingRangeClientCapabilities = - Lsp.Types.LinkedEditingRangeClientCapabilities
module InlineValueClientCapabilities = Lsp.Types.InlineValueClientCapabilities
module InlayHintClientCapabilities = Lsp.Types.InlayHintClientCapabilities
module ImplementationClientCapabilities = - Lsp.Types.ImplementationClientCapabilities
module HoverClientCapabilities = Lsp.Types.HoverClientCapabilities
module DocumentFormattingClientCapabilities = - Lsp.Types.DocumentFormattingClientCapabilities
module FoldingRangeClientCapabilities = - Lsp.Types.FoldingRangeClientCapabilities
module DocumentSymbolClientCapabilities = - Lsp.Types.DocumentSymbolClientCapabilities
module DocumentLinkClientCapabilities = - Lsp.Types.DocumentLinkClientCapabilities
module DocumentHighlightClientCapabilities = - Lsp.Types.DocumentHighlightClientCapabilities
module DiagnosticClientCapabilities = Lsp.Types.DiagnosticClientCapabilities
module DefinitionClientCapabilities = Lsp.Types.DefinitionClientCapabilities
module DeclarationClientCapabilities = Lsp.Types.DeclarationClientCapabilities
module CompletionClientCapabilities = Lsp.Types.CompletionClientCapabilities
module DocumentColorClientCapabilities = - Lsp.Types.DocumentColorClientCapabilities
module CodeLensClientCapabilities = Lsp.Types.CodeLensClientCapabilities
module CodeActionClientCapabilities = Lsp.Types.CodeActionClientCapabilities
module TextDocumentClientCapabilities = - Lsp.Types.TextDocumentClientCapabilities
module NotebookDocumentSyncClientCapabilities = - Lsp.Types.NotebookDocumentSyncClientCapabilities
module NotebookDocumentClientCapabilities = - Lsp.Types.NotebookDocumentClientCapabilities
module RegularExpressionsClientCapabilities = - Lsp.Types.RegularExpressionsClientCapabilities
module MarkdownClientCapabilities = Lsp.Types.MarkdownClientCapabilities
module GeneralClientCapabilities = Lsp.Types.GeneralClientCapabilities
module ClientCapabilities = Lsp.Types.ClientCapabilities
module Location = Lsp.Types.Location
module DiagnosticRelatedInformation = Lsp.Types.DiagnosticRelatedInformation
module CodeDescription = Lsp.Types.CodeDescription
module Diagnostic = Lsp.Types.Diagnostic
module Command = Lsp.Types.Command
module CodeAction = Lsp.Types.CodeAction
module CodeActionContext = Lsp.Types.CodeActionContext
module CodeActionOptions = Lsp.Types.CodeActionOptions
module CodeActionParams = Lsp.Types.CodeActionParams
module CodeActionRegistrationOptions = Lsp.Types.CodeActionRegistrationOptions
module CodeLens = Lsp.Types.CodeLens
module CodeLensOptions = Lsp.Types.CodeLensOptions
module CodeLensParams = Lsp.Types.CodeLensParams
module CodeLensRegistrationOptions = Lsp.Types.CodeLensRegistrationOptions
module Color = Lsp.Types.Color
module ColorInformation = Lsp.Types.ColorInformation
module ColorPresentation = Lsp.Types.ColorPresentation
module ColorPresentationParams = Lsp.Types.ColorPresentationParams
module CompletionContext = Lsp.Types.CompletionContext
module InsertReplaceEdit = Lsp.Types.InsertReplaceEdit
module CompletionItemLabelDetails = Lsp.Types.CompletionItemLabelDetails
module MarkupContent = Lsp.Types.MarkupContent
module CompletionItem = Lsp.Types.CompletionItem
module CompletionList = Lsp.Types.CompletionList
module CompletionOptions = Lsp.Types.CompletionOptions
module CompletionParams = Lsp.Types.CompletionParams
module CompletionRegistrationOptions = Lsp.Types.CompletionRegistrationOptions
module ConfigurationItem = Lsp.Types.ConfigurationItem
module ConfigurationParams = Lsp.Types.ConfigurationParams
module FileCreate = Lsp.Types.FileCreate
module CreateFilesParams = Lsp.Types.CreateFilesParams
module Declaration = Lsp.Types.Declaration
module DeclarationOptions = Lsp.Types.DeclarationOptions
module DeclarationParams = Lsp.Types.DeclarationParams
module DeclarationRegistrationOptions = - Lsp.Types.DeclarationRegistrationOptions
module Definition = Lsp.Types.Definition
module DefinitionOptions = Lsp.Types.DefinitionOptions
module DefinitionParams = Lsp.Types.DefinitionParams
module DefinitionRegistrationOptions = Lsp.Types.DefinitionRegistrationOptions
module FileDelete = Lsp.Types.FileDelete
module DeleteFilesParams = Lsp.Types.DeleteFilesParams
module DiagnosticOptions = Lsp.Types.DiagnosticOptions
module DiagnosticRegistrationOptions = Lsp.Types.DiagnosticRegistrationOptions
module DiagnosticServerCancellationData = - Lsp.Types.DiagnosticServerCancellationData
module DidChangeConfigurationParams = Lsp.Types.DidChangeConfigurationParams
module DidChangeConfigurationRegistrationOptions = - Lsp.Types.DidChangeConfigurationRegistrationOptions
module VersionedNotebookDocumentIdentifier = - Lsp.Types.VersionedNotebookDocumentIdentifier
module TextDocumentContentChangeEvent = - Lsp.Types.TextDocumentContentChangeEvent
module VersionedTextDocumentIdentifier = - Lsp.Types.VersionedTextDocumentIdentifier
module ExecutionSummary = Lsp.Types.ExecutionSummary
module NotebookCell = Lsp.Types.NotebookCell
module TextDocumentItem = Lsp.Types.TextDocumentItem
module NotebookCellArrayChange = Lsp.Types.NotebookCellArrayChange
module NotebookDocumentChangeEvent = Lsp.Types.NotebookDocumentChangeEvent
module DidChangeNotebookDocumentParams = - Lsp.Types.DidChangeNotebookDocumentParams
module DidChangeTextDocumentParams = Lsp.Types.DidChangeTextDocumentParams
module FileEvent = Lsp.Types.FileEvent
module DidChangeWatchedFilesParams = Lsp.Types.DidChangeWatchedFilesParams
module Pattern = Lsp.Types.Pattern
module WorkspaceFolder = Lsp.Types.WorkspaceFolder
module RelativePattern = Lsp.Types.RelativePattern
module GlobPattern = Lsp.Types.GlobPattern
module FileSystemWatcher = Lsp.Types.FileSystemWatcher
module DidChangeWatchedFilesRegistrationOptions = - Lsp.Types.DidChangeWatchedFilesRegistrationOptions
module WorkspaceFoldersChangeEvent = Lsp.Types.WorkspaceFoldersChangeEvent
module DidChangeWorkspaceFoldersParams = - Lsp.Types.DidChangeWorkspaceFoldersParams
module NotebookDocumentIdentifier = Lsp.Types.NotebookDocumentIdentifier
module DidCloseNotebookDocumentParams = - Lsp.Types.DidCloseNotebookDocumentParams
module DidCloseTextDocumentParams = Lsp.Types.DidCloseTextDocumentParams
module NotebookDocument = Lsp.Types.NotebookDocument
module DidOpenNotebookDocumentParams = Lsp.Types.DidOpenNotebookDocumentParams
module DidOpenTextDocumentParams = Lsp.Types.DidOpenTextDocumentParams
module DidSaveNotebookDocumentParams = Lsp.Types.DidSaveNotebookDocumentParams
module DidSaveTextDocumentParams = Lsp.Types.DidSaveTextDocumentParams
module DocumentColorOptions = Lsp.Types.DocumentColorOptions
module DocumentColorParams = Lsp.Types.DocumentColorParams
module DocumentColorRegistrationOptions = - Lsp.Types.DocumentColorRegistrationOptions
module DocumentDiagnosticParams = Lsp.Types.DocumentDiagnosticParams
module UnchangedDocumentDiagnosticReport = - Lsp.Types.UnchangedDocumentDiagnosticReport
module FullDocumentDiagnosticReport = Lsp.Types.FullDocumentDiagnosticReport
module RelatedUnchangedDocumentDiagnosticReport = - Lsp.Types.RelatedUnchangedDocumentDiagnosticReport
module RelatedFullDocumentDiagnosticReport = - Lsp.Types.RelatedFullDocumentDiagnosticReport
module DocumentDiagnosticReport = Lsp.Types.DocumentDiagnosticReport
module DocumentDiagnosticReportPartialResult = - Lsp.Types.DocumentDiagnosticReportPartialResult
module DocumentFormattingOptions = Lsp.Types.DocumentFormattingOptions
module FormattingOptions = Lsp.Types.FormattingOptions
module DocumentFormattingParams = Lsp.Types.DocumentFormattingParams
module DocumentFormattingRegistrationOptions = - Lsp.Types.DocumentFormattingRegistrationOptions
module DocumentHighlight = Lsp.Types.DocumentHighlight
module DocumentHighlightOptions = Lsp.Types.DocumentHighlightOptions
module DocumentHighlightParams = Lsp.Types.DocumentHighlightParams
module DocumentHighlightRegistrationOptions = - Lsp.Types.DocumentHighlightRegistrationOptions
module DocumentLinkOptions = Lsp.Types.DocumentLinkOptions
module DocumentLinkParams = Lsp.Types.DocumentLinkParams
module DocumentLinkRegistrationOptions = - Lsp.Types.DocumentLinkRegistrationOptions
module DocumentOnTypeFormattingOptions = - Lsp.Types.DocumentOnTypeFormattingOptions
module DocumentOnTypeFormattingParams = - Lsp.Types.DocumentOnTypeFormattingParams
module DocumentOnTypeFormattingRegistrationOptions = - Lsp.Types.DocumentOnTypeFormattingRegistrationOptions
module DocumentRangeFormattingOptions = - Lsp.Types.DocumentRangeFormattingOptions
module DocumentRangeFormattingParams = Lsp.Types.DocumentRangeFormattingParams
module DocumentRangeFormattingRegistrationOptions = - Lsp.Types.DocumentRangeFormattingRegistrationOptions
module DocumentSymbol = Lsp.Types.DocumentSymbol
module DocumentSymbolOptions = Lsp.Types.DocumentSymbolOptions
module DocumentSymbolParams = Lsp.Types.DocumentSymbolParams
module DocumentSymbolRegistrationOptions = - Lsp.Types.DocumentSymbolRegistrationOptions
module ExecuteCommandOptions = Lsp.Types.ExecuteCommandOptions
module ExecuteCommandParams = Lsp.Types.ExecuteCommandParams
module ExecuteCommandRegistrationOptions = - Lsp.Types.ExecuteCommandRegistrationOptions
module FileOperationPatternOptions = Lsp.Types.FileOperationPatternOptions
module FileOperationPattern = Lsp.Types.FileOperationPattern
module FileOperationFilter = Lsp.Types.FileOperationFilter
module FileOperationRegistrationOptions = - Lsp.Types.FileOperationRegistrationOptions
module FileOperationOptions = Lsp.Types.FileOperationOptions
module FileRename = Lsp.Types.FileRename
module FoldingRange = Lsp.Types.FoldingRange
module FoldingRangeOptions = Lsp.Types.FoldingRangeOptions
module FoldingRangeParams = Lsp.Types.FoldingRangeParams
module FoldingRangeRegistrationOptions = - Lsp.Types.FoldingRangeRegistrationOptions
module Hover = Lsp.Types.Hover
module HoverOptions = Lsp.Types.HoverOptions
module HoverParams = Lsp.Types.HoverParams
module HoverRegistrationOptions = Lsp.Types.HoverRegistrationOptions
module ImplementationOptions = Lsp.Types.ImplementationOptions
module ImplementationParams = Lsp.Types.ImplementationParams
module ImplementationRegistrationOptions = - Lsp.Types.ImplementationRegistrationOptions
module InitializeError = Lsp.Types.InitializeError
module InitializeParams = Lsp.Types.InitializeParams
module WorkspaceSymbolOptions = Lsp.Types.WorkspaceSymbolOptions
module WorkspaceFoldersServerCapabilities = - Lsp.Types.WorkspaceFoldersServerCapabilities
module TypeHierarchyRegistrationOptions = - Lsp.Types.TypeHierarchyRegistrationOptions
module TypeHierarchyOptions = Lsp.Types.TypeHierarchyOptions
module TypeDefinitionRegistrationOptions = - Lsp.Types.TypeDefinitionRegistrationOptions
module TypeDefinitionOptions = Lsp.Types.TypeDefinitionOptions
module SaveOptions = Lsp.Types.SaveOptions
module TextDocumentSyncOptions = Lsp.Types.TextDocumentSyncOptions
module SignatureHelpOptions = Lsp.Types.SignatureHelpOptions
module SemanticTokensLegend = Lsp.Types.SemanticTokensLegend
module SemanticTokensRegistrationOptions = - Lsp.Types.SemanticTokensRegistrationOptions
module SemanticTokensOptions = Lsp.Types.SemanticTokensOptions
module SelectionRangeRegistrationOptions = - Lsp.Types.SelectionRangeRegistrationOptions
module SelectionRangeOptions = Lsp.Types.SelectionRangeOptions
module RenameOptions = Lsp.Types.RenameOptions
module ReferenceOptions = Lsp.Types.ReferenceOptions
module MonikerRegistrationOptions = Lsp.Types.MonikerRegistrationOptions
module MonikerOptions = Lsp.Types.MonikerOptions
module LinkedEditingRangeRegistrationOptions = - Lsp.Types.LinkedEditingRangeRegistrationOptions
module LinkedEditingRangeOptions = Lsp.Types.LinkedEditingRangeOptions
module InlineValueRegistrationOptions = - Lsp.Types.InlineValueRegistrationOptions
module InlineValueOptions = Lsp.Types.InlineValueOptions
module InlayHintRegistrationOptions = Lsp.Types.InlayHintRegistrationOptions
module InlayHintOptions = Lsp.Types.InlayHintOptions
module ServerCapabilities = Lsp.Types.ServerCapabilities
module InitializeResult = Lsp.Types.InitializeResult
module InitializedParams_ = Lsp.Types.InitializedParams_
module InlayHintLabelPart = Lsp.Types.InlayHintLabelPart
module InlayHint = Lsp.Types.InlayHint
module InlayHintParams = Lsp.Types.InlayHintParams
module InlineValueEvaluatableExpression = - Lsp.Types.InlineValueEvaluatableExpression
module InlineValueVariableLookup = Lsp.Types.InlineValueVariableLookup
module InlineValueText = Lsp.Types.InlineValueText
module InlineValue = Lsp.Types.InlineValue
module InlineValueContext = Lsp.Types.InlineValueContext
module InlineValueParams = Lsp.Types.InlineValueParams
module LinkedEditingRangeParams = Lsp.Types.LinkedEditingRangeParams
module LinkedEditingRanges = Lsp.Types.LinkedEditingRanges
module LogMessageParams = Lsp.Types.LogMessageParams
module LogTraceParams = Lsp.Types.LogTraceParams
module MessageActionItem = Lsp.Types.MessageActionItem
module Moniker = Lsp.Types.Moniker
module MonikerParams = Lsp.Types.MonikerParams
module ParameterInformation = Lsp.Types.ParameterInformation
module PartialResultParams = Lsp.Types.PartialResultParams
module PrepareRenameParams = Lsp.Types.PrepareRenameParams
module PreviousResultId = Lsp.Types.PreviousResultId
module PublishDiagnosticsParams = Lsp.Types.PublishDiagnosticsParams
module ReferenceContext = Lsp.Types.ReferenceContext
module ReferenceParams = Lsp.Types.ReferenceParams
module ReferenceRegistrationOptions = Lsp.Types.ReferenceRegistrationOptions
module Registration = Lsp.Types.Registration
module RegistrationParams = Lsp.Types.RegistrationParams
module RenameFilesParams = Lsp.Types.RenameFilesParams
module RenameParams = Lsp.Types.RenameParams
module RenameRegistrationOptions = Lsp.Types.RenameRegistrationOptions
module ResourceOperation = Lsp.Types.ResourceOperation
module SelectionRange = Lsp.Types.SelectionRange
module SelectionRangeParams = Lsp.Types.SelectionRangeParams
module SemanticTokens = Lsp.Types.SemanticTokens
module SemanticTokensEdit = Lsp.Types.SemanticTokensEdit
module SemanticTokensDelta = Lsp.Types.SemanticTokensDelta
module SemanticTokensDeltaParams = Lsp.Types.SemanticTokensDeltaParams
module SemanticTokensDeltaPartialResult = - Lsp.Types.SemanticTokensDeltaPartialResult
module SemanticTokensParams = Lsp.Types.SemanticTokensParams
module SemanticTokensPartialResult = Lsp.Types.SemanticTokensPartialResult
module SemanticTokensRangeParams = Lsp.Types.SemanticTokensRangeParams
module SetTraceParams = Lsp.Types.SetTraceParams
module ShowDocumentParams = Lsp.Types.ShowDocumentParams
module ShowDocumentResult = Lsp.Types.ShowDocumentResult
module ShowMessageParams = Lsp.Types.ShowMessageParams
module ShowMessageRequestParams = Lsp.Types.ShowMessageRequestParams
module SignatureInformation = Lsp.Types.SignatureInformation
module SignatureHelp = Lsp.Types.SignatureHelp
module SignatureHelpContext = Lsp.Types.SignatureHelpContext
module SignatureHelpParams = Lsp.Types.SignatureHelpParams
module SignatureHelpRegistrationOptions = - Lsp.Types.SignatureHelpRegistrationOptions
module StaticRegistrationOptions = Lsp.Types.StaticRegistrationOptions
module SymbolInformation = Lsp.Types.SymbolInformation
module T = Lsp.Types.T
module TextDocumentChangeRegistrationOptions = - Lsp.Types.TextDocumentChangeRegistrationOptions
module TextDocumentPositionParams = Lsp.Types.TextDocumentPositionParams
module TextDocumentRegistrationOptions = - Lsp.Types.TextDocumentRegistrationOptions
module TextDocumentSaveRegistrationOptions = - Lsp.Types.TextDocumentSaveRegistrationOptions
module TypeDefinitionParams = Lsp.Types.TypeDefinitionParams
module TypeHierarchyItem = Lsp.Types.TypeHierarchyItem
module TypeHierarchyPrepareParams = Lsp.Types.TypeHierarchyPrepareParams
module TypeHierarchySubtypesParams = Lsp.Types.TypeHierarchySubtypesParams
module TypeHierarchySupertypesParams = Lsp.Types.TypeHierarchySupertypesParams
module Unregistration = Lsp.Types.Unregistration
module UnregistrationParams = Lsp.Types.UnregistrationParams
module WillSaveTextDocumentParams = Lsp.Types.WillSaveTextDocumentParams
module WorkDoneProgressBegin = Lsp.Types.WorkDoneProgressBegin
module WorkDoneProgressCancelParams = Lsp.Types.WorkDoneProgressCancelParams
module WorkDoneProgressCreateParams = Lsp.Types.WorkDoneProgressCreateParams
module WorkDoneProgressEnd = Lsp.Types.WorkDoneProgressEnd
module WorkDoneProgressOptions = Lsp.Types.WorkDoneProgressOptions
module WorkDoneProgressParams = Lsp.Types.WorkDoneProgressParams
module WorkDoneProgressReport = Lsp.Types.WorkDoneProgressReport
module WorkspaceDiagnosticParams = Lsp.Types.WorkspaceDiagnosticParams
module WorkspaceUnchangedDocumentDiagnosticReport = - Lsp.Types.WorkspaceUnchangedDocumentDiagnosticReport
module WorkspaceFullDocumentDiagnosticReport = - Lsp.Types.WorkspaceFullDocumentDiagnosticReport
module WorkspaceDocumentDiagnosticReport = - Lsp.Types.WorkspaceDocumentDiagnosticReport
module WorkspaceDiagnosticReport = Lsp.Types.WorkspaceDiagnosticReport
module WorkspaceDiagnosticReportPartialResult = - Lsp.Types.WorkspaceDiagnosticReportPartialResult
module WorkspaceFoldersInitializeParams = - Lsp.Types.WorkspaceFoldersInitializeParams
module WorkspaceSymbol = Lsp.Types.WorkspaceSymbol
module WorkspaceSymbolParams = Lsp.Types.WorkspaceSymbolParams
module WorkspaceSymbolRegistrationOptions = - Lsp.Types.WorkspaceSymbolRegistrationOptions
module CodeActionResult = Lsp.Types.CodeActionResult
module Locations = Lsp.Types.Locations
include module type of struct include IO_lwt end
type 'a t = 'a Lwt.t
val return : 'a -> 'a t
val failwith : string -> 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
type in_channel = Lwt_io.input Lwt_io.channel
type out_channel = Lwt_io.output Lwt_io.channel
val stdin : in_channel
val stdout : out_channel
val read : in_channel -> bytes -> int -> int -> unit t
val read_line : in_channel -> string t
val write : out_channel -> bytes -> int -> int -> unit t
val write_string : out_channel -> string -> unit t
val fail : exn -> unit t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
type doc_state = Linol.Server.doc_state
module Jsonrpc2 : sig ... end
val run : 'a Lwt.t -> 'a
diff --git a/linol-lwt/_doc-dir/CHANGES.md b/linol-lwt/_doc-dir/CHANGES.md deleted file mode 100644 index b1924ee2..00000000 --- a/linol-lwt/_doc-dir/CHANGES.md +++ /dev/null @@ -1,15 +0,0 @@ - -# 0.5 - -- api break: put `spawn` in the server itself, not `IO` - -- require OCaml 4.14 -- migrate to lsp 1.17 -- support inlay hints -- internal tracing with `trace` -- [#24] Expose get_uri for notify_back -- expose log source -- [#22] Threat shutdown and exit requests correctly -- [#20] Handle messages with null value for "params" field -- Handle server requests -- handle workDoneTokens diff --git a/linol-lwt/_doc-dir/README.md b/linol-lwt/_doc-dir/README.md deleted file mode 100644 index 18005461..00000000 --- a/linol-lwt/_doc-dir/README.md +++ /dev/null @@ -1,8 +0,0 @@ - -# Linol [![build](https://github.com/c-cube/linol/actions/workflows/main.yml/badge.svg)](https://github.com/c-cube/linol/actions/workflows/main.yml) - -This is a wrapper around the `lsp` library, which provides base types for the protocol. Linol ("linol is not ocaml-lsp") provides an object abstraction so that users can override only the methods they provide, and a Lwt implementation of the jsonrpc wire protocol. - -## License - -MIT license. diff --git a/linol-lwt/index.html b/linol-lwt/index.html deleted file mode 100644 index 11e52e89..00000000 --- a/linol-lwt/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -index (linol-lwt.index)

Package linol-lwt

Package info

changes-files
readme-files
diff --git a/linol/Linol/Blocking_IO/index.html b/linol/Linol/Blocking_IO/index.html deleted file mode 100644 index 3c944c3e..00000000 --- a/linol/Linol/Blocking_IO/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Blocking_IO (linol.Linol.Blocking_IO)

Module Linol.Blocking_IO

Blocking IO with a new thread for each spawn.

type 'a t = 'a
val return : 'a -> 'a t
val failwith : string -> 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
type in_channel = in_channel
type out_channel = out_channel
val stdin : in_channel
val stdout : out_channel
val read : in_channel -> bytes -> int -> int -> unit t
val read_line : in_channel -> string t
val write : out_channel -> bytes -> int -> int -> unit t
val write_string : out_channel -> string -> unit t
val fail : exn -> unit t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
val n_bytes_written : int Stdlib.Atomic.t
  • since 0.5
val n_bytes_read : int Stdlib.Atomic.t
  • since 0.5
val default_spawn : (unit -> unit) -> unit

Start a new thread.

  • since 0.5
diff --git a/linol/Linol/Jsonrpc2/Make/Req_id/index.html b/linol/Linol/Jsonrpc2/Make/Req_id/index.html deleted file mode 100644 index 67e3e21e..00000000 --- a/linol/Linol/Jsonrpc2/Make/Req_id/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Req_id (linol.Linol.Jsonrpc2.Make.Req_id)

Module Make.Req_id

Request ID.

The unique ID of a request, used by JSONRPC to map each request to its reply.

type t = Jsonrpc.Id.t
val to_string : t -> string

String representation of the ID

diff --git a/linol/Linol/Jsonrpc2/Make/argument-1-IO/index.html b/linol/Linol/Jsonrpc2/Make/argument-1-IO/index.html deleted file mode 100644 index 56d9f673..00000000 --- a/linol/Linol/Jsonrpc2/Make/argument-1-IO/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -IO (linol.Linol.Jsonrpc2.Make.IO)

Parameter Make.IO

type 'a t
val return : 'a -> 'a t
val failwith : string -> 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
type in_channel
type out_channel
val stdin : in_channel
val stdout : out_channel
val read : in_channel -> bytes -> int -> int -> unit t
val read_line : in_channel -> string t
val write : out_channel -> bytes -> int -> int -> unit t
val write_string : out_channel -> string -> unit t
val fail : exn -> unit t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
diff --git a/linol/Linol/Jsonrpc2/Make/class-base_server/index.html b/linol/Linol/Jsonrpc2/Make/class-base_server/index.html deleted file mode 100644 index 79ecc662..00000000 --- a/linol/Linol/Jsonrpc2/Make/class-base_server/index.html +++ /dev/null @@ -1,9 +0,0 @@ - -base_server (linol.Linol.Jsonrpc2.Make.base_server)

Class Make.base_server

method must_quit : bool
method on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) -> - server_request:send_request -> - Lsp.Client_notification.t -> - unit IO.t
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.t
method spawn_query_handler : (unit -> unit IO.t) -> unit
diff --git a/linol/Linol/Jsonrpc2/Make/class-notify_back/index.html b/linol/Linol/Jsonrpc2/Make/class-notify_back/index.html deleted file mode 100644 index 27576200..00000000 --- a/linol/Linol/Jsonrpc2/Make/class-notify_back/index.html +++ /dev/null @@ -1,6 +0,0 @@ - -notify_back (linol.Linol.Jsonrpc2.Make.notify_back)

Class Make.notify_back

val mutable uri : Lsp.Types.DocumentUri.t option
method cancel_request : Jsonrpc.Id.t -> unit IO.t
method get_uri : Lsp.Types.DocumentUri.t option
method send_diagnostic : Diagnostic.t list -> unit IO.t
method send_log_msg : type_:Lsp__Types.MessageType.t -> string -> unit IO.t
method send_notification : Lsp.Server_notification.t -> unit IO.t
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.t
method set_uri : Lsp.Types.DocumentUri.t -> unit
method telemetry : Lsp__.Import.Json.t -> unit IO.t
method work_done_progress_begin : Lsp.Types.WorkDoneProgressBegin.t -> - unit IO.t
method work_done_progress_end : Lsp.Types.WorkDoneProgressEnd.t -> unit IO.t
method work_done_progress_report : Lsp.Types.WorkDoneProgressReport.t -> - unit IO.t
diff --git a/linol/Linol/Jsonrpc2/Make/class-server/index.html b/linol/Linol/Jsonrpc2/Make/class-server/index.html deleted file mode 100644 index a7ed8758..00000000 --- a/linol/Linol/Jsonrpc2/Make/class-server/index.html +++ /dev/null @@ -1,99 +0,0 @@ - -server (linol.Linol.Jsonrpc2.Make.server)

Class Make.server

val mutable status : [ `ReceivedExit | `ReceivedShutdown | `Running ]
method config_code_action_provider : [ `Bool of bool - | `CodeActionOptions of - Lsp.Types.CodeActionOptions.t ]
method config_code_lens_options : Lsp.Types.CodeLensOptions.t option
method config_completion : Lsp.Types.CompletionOptions.t option
method config_definition : [ `Bool of bool - | `DefinitionOptions of - Lsp.Types.DefinitionOptions.t ] - option
method config_hover : [ `Bool of bool - | `HoverOptions of Lsp.Types.HoverOptions.t ] - option
method config_list_commands : string list
method config_modify_capabilities : Lsp.Types.ServerCapabilities.t -> - Lsp.Types.ServerCapabilities.t
method config_symbol : [ `Bool of bool - | `DocumentSymbolOptions of - Lsp.Types.DocumentSymbolOptions.t ] - option
method config_sync_opts : Lsp.Types.TextDocumentSyncOptions.t
method find_doc : Lsp.Types.DocumentUri.t -> doc_state option
method get_status : [ `ReceivedExit | `ReceivedShutdown | `Running ]
method must_quit : bool
method 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.t
method on_notif_doc_did_close : notify_back:notify_back -> - Lsp.Types.TextDocumentIdentifier.t -> - unit IO.t
method on_notif_doc_did_open : notify_back:notify_back -> - Lsp.Types.TextDocumentItem.t -> - content:string -> - unit IO.t
method on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) -> - server_request:send_request -> - Lsp.Client_notification.t -> - unit IO.t
method on_notification_unhandled : notify_back:notify_back -> - Lsp.Client_notification.t -> - unit IO.t
method on_req_code_action : notify_back:notify_back -> - id:Req_id.t -> - Lsp.Types.CodeActionParams.t -> - Lsp.Types.CodeActionResult.t IO.t
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.t
method on_req_code_lens_resolve : notify_back:notify_back -> - id:Req_id.t -> - Lsp.Types.CodeLens.t -> - Lsp.Types.CodeLens.t IO.t
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.t
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.t
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.t
method 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.t
method on_req_initialize : notify_back:notify_back -> - Lsp.Types.InitializeParams.t -> - Lsp.Types.InitializeResult.t IO.t
method 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.t
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.t
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.t
method on_request_unhandled : 'r. notify_back:notify_back -> - id:Req_id.t -> - 'r Lsp.Client_request.t -> - 'r IO.t
method on_unknown_notification : notify_back:notify_back -> - Jsonrpc.Notification.t -> - unit IO.t
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.t
method spawn_query_handler : (unit -> unit IO.t) -> unit
diff --git a/linol/Linol/Jsonrpc2/Make/index.html b/linol/Linol/Jsonrpc2/Make/index.html deleted file mode 100644 index 46941a59..00000000 --- a/linol/Linol/Jsonrpc2/Make/index.html +++ /dev/null @@ -1,11 +0,0 @@ - -Make (linol.Linol.Jsonrpc2.Make)

Module Jsonrpc2.Make

Parameters

module IO : IO

Signature

module IO = IO
type t

A jsonrpc2 connection.

include sig ... end
module Position = Lsp.Types.Position
module Range = Lsp.Types.Range
module Diagnostic = Lsp.Types.Diagnostic
module DiagnosticSeverity = Lsp.Types.DiagnosticSeverity
module Req_id : sig ... end
type server_request_handler_pair =
  1. | Request_and_handler : 'from_server Lsp.Server_request.t - * (('from_server, Jsonrpc.Response.Error.t) result -> - unit IO.t) -> server_request_handler_pair
class virtual base_server : object ... end
val async : base_server -> (unit -> unit IO.t) -> unit IO.t
class 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 ... end
type nonrec doc_state = {
  1. uri : Lsp.Types.DocumentUri.t;
  2. languageId : string;
  3. version : int;
  4. content : string;
}
class virtual server : object ... end
val create : ic:IO.in_channel -> oc:IO.out_channel -> server -> t

Create a connection from the pair of channels

val create_stdio : server -> t

Create a connection using stdin/stdout

val send_server_notification : t -> Lsp.Server_notification.t -> unit IO.t

Send a notification from the server.

  • since 0.5
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.t

Send a request from the server, and pass a callback that will be called with the result in the future.

  • since 0.5
val run : ?shutdown:(unit -> bool) -> t -> unit IO.t

Listen for incoming messages and responses.

  • parameter shutdown

    if true, tells the server to shut down

diff --git a/linol/Linol/Jsonrpc2/index.html b/linol/Linol/Jsonrpc2/index.html deleted file mode 100644 index 6af323fd..00000000 --- a/linol/Linol/Jsonrpc2/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Jsonrpc2 (linol.Linol.Jsonrpc2)

Module Linol.Jsonrpc2

Simple JSON-RPC2 implementation.

See the spec

type json = Yojson.Safe.t
module type IO = sig ... end
module type S = sig ... end
module Make (IO : IO) : S with module IO = IO
diff --git a/linol/Linol/Jsonrpc2/module-type-IO/index.html b/linol/Linol/Jsonrpc2/module-type-IO/index.html deleted file mode 100644 index 114d8a32..00000000 --- a/linol/Linol/Jsonrpc2/module-type-IO/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -IO (linol.Linol.Jsonrpc2.IO)

Module type Jsonrpc2.IO

type 'a t
val return : 'a -> 'a t
val failwith : string -> 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
type in_channel
type out_channel
val stdin : in_channel
val stdout : out_channel
val read : in_channel -> bytes -> int -> int -> unit t
val read_line : in_channel -> string t
val write : out_channel -> bytes -> int -> int -> unit t
val write_string : out_channel -> string -> unit t
val fail : exn -> unit t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
diff --git a/linol/Linol/Jsonrpc2/module-type-S/IO/index.html b/linol/Linol/Jsonrpc2/module-type-S/IO/index.html deleted file mode 100644 index eb8aaec4..00000000 --- a/linol/Linol/Jsonrpc2/module-type-S/IO/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -IO (linol.Linol.Jsonrpc2.S.IO)

Module S.IO

type 'a t
val return : 'a -> 'a t
val failwith : string -> 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
type in_channel
type out_channel
val stdin : in_channel
val stdout : out_channel
val read : in_channel -> bytes -> int -> int -> unit t
val read_line : in_channel -> string t
val write : out_channel -> bytes -> int -> int -> unit t
val write_string : out_channel -> string -> unit t
val fail : exn -> unit t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
diff --git a/linol/Linol/Jsonrpc2/module-type-S/Req_id/index.html b/linol/Linol/Jsonrpc2/module-type-S/Req_id/index.html deleted file mode 100644 index 5a82f4a9..00000000 --- a/linol/Linol/Jsonrpc2/module-type-S/Req_id/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Req_id (linol.Linol.Jsonrpc2.S.Req_id)

Module S.Req_id

Request ID.

The unique ID of a request, used by JSONRPC to map each request to its reply.

type t = Jsonrpc.Id.t
val to_string : t -> string

String representation of the ID

diff --git a/linol/Linol/Jsonrpc2/module-type-S/class-base_server/index.html b/linol/Linol/Jsonrpc2/module-type-S/class-base_server/index.html deleted file mode 100644 index c5c6da93..00000000 --- a/linol/Linol/Jsonrpc2/module-type-S/class-base_server/index.html +++ /dev/null @@ -1,9 +0,0 @@ - -base_server (linol.Linol.Jsonrpc2.S.base_server)

Class S.base_server

method must_quit : bool
method on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) -> - server_request:send_request -> - Lsp.Client_notification.t -> - unit IO.t
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.t
method spawn_query_handler : (unit -> unit IO.t) -> unit
diff --git a/linol/Linol/Jsonrpc2/module-type-S/class-notify_back/index.html b/linol/Linol/Jsonrpc2/module-type-S/class-notify_back/index.html deleted file mode 100644 index 416adcff..00000000 --- a/linol/Linol/Jsonrpc2/module-type-S/class-notify_back/index.html +++ /dev/null @@ -1,6 +0,0 @@ - -notify_back (linol.Linol.Jsonrpc2.S.notify_back)

Class S.notify_back

val mutable uri : Lsp.Types.DocumentUri.t option
method cancel_request : Jsonrpc.Id.t -> unit IO.t
method get_uri : Lsp.Types.DocumentUri.t option
method send_diagnostic : Diagnostic.t list -> unit IO.t
method send_log_msg : type_:Lsp__Types.MessageType.t -> string -> unit IO.t
method send_notification : Lsp.Server_notification.t -> unit IO.t
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.t
method set_uri : Lsp.Types.DocumentUri.t -> unit
method telemetry : Lsp__.Import.Json.t -> unit IO.t
method work_done_progress_begin : Lsp.Types.WorkDoneProgressBegin.t -> - unit IO.t
method work_done_progress_end : Lsp.Types.WorkDoneProgressEnd.t -> unit IO.t
method work_done_progress_report : Lsp.Types.WorkDoneProgressReport.t -> - unit IO.t
diff --git a/linol/Linol/Jsonrpc2/module-type-S/class-server/index.html b/linol/Linol/Jsonrpc2/module-type-S/class-server/index.html deleted file mode 100644 index e57a92b3..00000000 --- a/linol/Linol/Jsonrpc2/module-type-S/class-server/index.html +++ /dev/null @@ -1,99 +0,0 @@ - -server (linol.Linol.Jsonrpc2.S.server)

Class S.server

val mutable status : [ `ReceivedExit | `ReceivedShutdown | `Running ]
method config_code_action_provider : [ `Bool of bool - | `CodeActionOptions of - Lsp.Types.CodeActionOptions.t ]
method config_code_lens_options : Lsp.Types.CodeLensOptions.t option
method config_completion : Lsp.Types.CompletionOptions.t option
method config_definition : [ `Bool of bool - | `DefinitionOptions of - Lsp.Types.DefinitionOptions.t ] - option
method config_hover : [ `Bool of bool - | `HoverOptions of Lsp.Types.HoverOptions.t ] - option
method config_list_commands : string list
method config_modify_capabilities : Lsp.Types.ServerCapabilities.t -> - Lsp.Types.ServerCapabilities.t
method config_symbol : [ `Bool of bool - | `DocumentSymbolOptions of - Lsp.Types.DocumentSymbolOptions.t ] - option
method config_sync_opts : Lsp.Types.TextDocumentSyncOptions.t
method find_doc : Lsp.Types.DocumentUri.t -> doc_state option
method get_status : [ `ReceivedExit | `ReceivedShutdown | `Running ]
method must_quit : bool
method 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.t
method on_notif_doc_did_close : notify_back:notify_back -> - Lsp.Types.TextDocumentIdentifier.t -> - unit IO.t
method on_notif_doc_did_open : notify_back:notify_back -> - Lsp.Types.TextDocumentItem.t -> - content:string -> - unit IO.t
method on_notification : notify_back:(Lsp.Server_notification.t -> unit IO.t) -> - server_request:send_request -> - Lsp.Client_notification.t -> - unit IO.t
method on_notification_unhandled : notify_back:notify_back -> - Lsp.Client_notification.t -> - unit IO.t
method on_req_code_action : notify_back:notify_back -> - id:Req_id.t -> - Lsp.Types.CodeActionParams.t -> - Lsp.Types.CodeActionResult.t IO.t
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.t
method on_req_code_lens_resolve : notify_back:notify_back -> - id:Req_id.t -> - Lsp.Types.CodeLens.t -> - Lsp.Types.CodeLens.t IO.t
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.t
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.t
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.t
method 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.t
method on_req_initialize : notify_back:notify_back -> - Lsp.Types.InitializeParams.t -> - Lsp.Types.InitializeResult.t IO.t
method 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.t
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.t
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.t
method on_request_unhandled : 'r. notify_back:notify_back -> - id:Req_id.t -> - 'r Lsp.Client_request.t -> - 'r IO.t
method on_unknown_notification : notify_back:notify_back -> - Jsonrpc.Notification.t -> - unit IO.t
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.t
method spawn_query_handler : (unit -> unit IO.t) -> unit
diff --git a/linol/Linol/Jsonrpc2/module-type-S/index.html b/linol/Linol/Jsonrpc2/module-type-S/index.html deleted file mode 100644 index a272d730..00000000 --- a/linol/Linol/Jsonrpc2/module-type-S/index.html +++ /dev/null @@ -1,11 +0,0 @@ - -S (linol.Linol.Jsonrpc2.S)

Module type Jsonrpc2.S

module IO : IO
type t

A jsonrpc2 connection.

include sig ... end
module Position = Lsp.Types.Position
module Range = Lsp.Types.Range
module Diagnostic = Lsp.Types.Diagnostic
module DiagnosticSeverity = Lsp.Types.DiagnosticSeverity
module Req_id : sig ... end
type server_request_handler_pair =
  1. | Request_and_handler : 'from_server Lsp.Server_request.t - * (('from_server, Jsonrpc.Response.Error.t) result -> - unit IO.t) -> server_request_handler_pair
class virtual base_server : object ... end
val async : base_server -> (unit -> unit IO.t) -> unit IO.t
class 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 ... end
type nonrec doc_state = {
  1. uri : Lsp.Types.DocumentUri.t;
  2. languageId : string;
  3. version : int;
  4. content : string;
}
class virtual server : object ... end
val create : ic:IO.in_channel -> oc:IO.out_channel -> server -> t

Create a connection from the pair of channels

val create_stdio : server -> t

Create a connection using stdin/stdout

val send_server_notification : t -> Lsp.Server_notification.t -> unit IO.t

Send a notification from the server.

  • since 0.5
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.t

Send a request from the server, and pass a callback that will be called with the result in the future.

  • since 0.5
val run : ?shutdown:(unit -> bool) -> t -> unit IO.t

Listen for incoming messages and responses.

  • parameter shutdown

    if true, tells the server to shut down

diff --git a/linol/Linol/Server/Make/argument-1-IO/index.html b/linol/Linol/Server/Make/argument-1-IO/index.html deleted file mode 100644 index 485e3a38..00000000 --- a/linol/Linol/Server/Make/argument-1-IO/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -IO (linol.Linol.Server.Make.IO)

Parameter Make.IO

type 'a t
val return : 'a -> 'a t
val failwith : string -> 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
type in_channel
type out_channel
val stdin : in_channel
val stdout : out_channel
val read : in_channel -> bytes -> int -> int -> unit t
val read_line : in_channel -> string t
val write : out_channel -> bytes -> int -> int -> unit t
val write_string : out_channel -> string -> unit t
val fail : exn -> unit t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
diff --git a/linol/Linol/Server/Make/class-base_server/index.html b/linol/Linol/Server/Make/class-base_server/index.html deleted file mode 100644 index 30b6733c..00000000 --- a/linol/Linol/Server/Make/class-base_server/index.html +++ /dev/null @@ -1,11 +0,0 @@ - -base_server (linol.Linol.Server.Make.base_server)

Class Make.base_server

The 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.t
method 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.t

Method called to handle client requests.

  • parameter notify_back

    an object used to reply to the client, send progress messages, diagnostics, etc.

  • parameter id

    the query RPC ID, can be used for tracing, cancellation, etc.

method must_quit : bool

Set to true if the client requested to exit

method virtual spawn_query_handler : (unit -> unit IO.t) -> unit

How to start a new future/task/thread concurrently. This is used to process incoming user queries.

  • since 0.5
diff --git a/linol/Linol/Server/Make/class-notify_back/index.html b/linol/Linol/Server/Make/class-notify_back/index.html deleted file mode 100644 index 74744d76..00000000 --- a/linol/Linol/Server/Make/class-notify_back/index.html +++ /dev/null @@ -1,6 +0,0 @@ - -notify_back (linol.Linol.Server.Make.notify_back)

Class Make.notify_back

A wrapper to more easily reply to notifications

val mutable uri : Lsp.Types.DocumentUri.t option
method set_uri : Lsp.Types.DocumentUri.t -> unit
method get_uri : Lsp.Types.DocumentUri.t option
method send_log_msg : type_:Lsp__Types.MessageType.t -> string -> unit IO.t

Send a log message to the editor

method send_diagnostic : Diagnostic.t list -> unit IO.t

Send diagnostics for the current document

method telemetry : Lsp__.Import.Json.t -> unit IO.t
method cancel_request : Jsonrpc.Id.t -> unit IO.t
method work_done_progress_begin : Lsp.Types.WorkDoneProgressBegin.t -> - unit IO.t
method work_done_progress_report : Lsp.Types.WorkDoneProgressReport.t -> - unit IO.t
method work_done_progress_end : Lsp.Types.WorkDoneProgressEnd.t -> unit IO.t
method send_notification : Lsp.Server_notification.t -> unit IO.t

Send 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.t

Send a request from the server to the client (general purpose method)

diff --git a/linol/Linol/Server/Make/class-server/index.html b/linol/Linol/Server/Make/class-server/index.html deleted file mode 100644 index c9390b5a..00000000 --- a/linol/Linol/Server/Make/class-server/index.html +++ /dev/null @@ -1,99 +0,0 @@ - -server (linol.Linol.Server.Make.server)

Class Make.server

An 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_server
val mutable status : [ `ReceivedExit | `ReceivedShutdown | `Running ]
method get_status : [ `ReceivedExit | `ReceivedShutdown | `Running ]

Check if exit or shutdown request was made by the client.

  • since 0.5
method find_doc : Lsp.Types.DocumentUri.t -> doc_state option

Find 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.t

Override to process other requests

method config_sync_opts : Lsp.Types.TextDocumentSyncOptions.t

Parameter for how to synchronize content with the editor

method config_completion : Lsp.Types.CompletionOptions.t option

Configuration for the completion API.

  • since 0.4
method config_code_lens_options : Lsp.Types.CodeLensOptions.t option
  • since 0.3
method config_definition : [ `Bool of bool - | `DefinitionOptions of - Lsp.Types.DefinitionOptions.t ] - option
  • since 0.3
method config_hover : [ `Bool of bool - | `HoverOptions of Lsp.Types.HoverOptions.t ] - option
  • since 0.3
method config_symbol : [ `Bool of bool - | `DocumentSymbolOptions of - Lsp.Types.DocumentSymbolOptions.t ] - option
  • since 0.3
method config_code_action_provider : [ `Bool of bool - | `CodeActionOptions of - Lsp.Types.CodeActionOptions.t ]
  • since 0.3
method config_modify_capabilities : Lsp.Types.ServerCapabilities.t -> - Lsp.Types.ServerCapabilities.t

Modify capabilities before sending them back to the client. By default we just return them unmodified.

  • since 0.3
method config_list_commands : string list

List of commands available

method on_req_initialize : notify_back:notify_back -> - Lsp.Types.InitializeParams.t -> - Lsp.Types.InitializeResult.t IO.t
method 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.t

Called 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.t

Called 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.t

Called 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.t

List code lenses for the given document

  • since 0.3
method on_req_code_lens_resolve : notify_back:notify_back -> - id:Req_id.t -> - Lsp.Types.CodeLens.t -> - Lsp.Types.CodeLens.t IO.t

Code lens resolution, must return a code lens with non null "command"

  • since 0.3
method on_req_code_action : notify_back:notify_back -> - id:Req_id.t -> - Lsp.Types.CodeActionParams.t -> - Lsp.Types.CodeActionResult.t IO.t

Code action.

  • since 0.3
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.t

Execute a command with given arguments.

  • since 0.3
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.t

List symbols in this document.

  • since 0.3
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.t
method 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.t

Provide inlay hints for this document.

  • since 0.5
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.t
method virtual on_notif_doc_did_open : notify_back:notify_back -> - Lsp.Types.TextDocumentItem.t -> - content:string -> - unit IO.t

Called when a document is opened

method virtual on_notif_doc_did_close : notify_back:notify_back -> - Lsp.Types.TextDocumentIdentifier.t -> - unit IO.t
method 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.t

Called when the document changes.

method on_unknown_notification : notify_back:notify_back -> - Jsonrpc.Notification.t -> - unit IO.t
method on_notification_unhandled : notify_back:notify_back -> - Lsp.Client_notification.t -> - unit IO.t

Override 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.t
diff --git a/linol/Linol/Server/Make/index.html b/linol/Linol/Server/Make/index.html deleted file mode 100644 index 385b7b3a..00000000 --- a/linol/Linol/Server/Make/index.html +++ /dev/null @@ -1,8 +0,0 @@ - -Make (linol.Linol.Server.Make)

Module Server.Make

Server interface for some IO substrate.

Parameters

module IO : sig ... end

Signature

module Position = Lsp.Types.Position
module Range = Lsp.Types.Range
module Diagnostic = Lsp.Types.Diagnostic
module DiagnosticSeverity = Lsp.Types.DiagnosticSeverity
module Req_id = Req_id
type server_request_handler_pair =
  1. | Request_and_handler : 'from_server Lsp.Server_request.t - * (('from_server, Jsonrpc.Response.Error.t) result -> - unit IO.t) -> server_request_handler_pair

A 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.

The type of the action that sends a request from the server to the client and handles its response.

class virtual base_server : object ... end

The server baseclass

val async : base_server -> (unit -> unit IO.t) -> unit IO.t
class 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 ... end

A wrapper to more easily reply to notifications

type nonrec doc_state = doc_state = {
  1. uri : Lsp.Types.DocumentUri.t;
  2. languageId : string;
  3. version : int;
  4. content : string;
}

Current state of a document.

class virtual server : object ... end

An 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.

diff --git a/linol/Linol/Server/Req_id/index.html b/linol/Linol/Server/Req_id/index.html deleted file mode 100644 index 5be5778f..00000000 --- a/linol/Linol/Server/Req_id/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Req_id (linol.Linol.Server.Req_id)

Module Server.Req_id

Request ID.

The unique ID of a request, used by JSONRPC to map each request to its reply.

type t = Jsonrpc.Id.t
val to_string : t -> string

String representation of the ID

diff --git a/linol/Linol/Server/index.html b/linol/Linol/Server/index.html deleted file mode 100644 index a670dceb..00000000 --- a/linol/Linol/Server/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Server (linol.Linol.Server)

Module Linol.Server

Server interface

type nonrec doc_state = {
  1. uri : Lsp.Types.DocumentUri.t;
  2. languageId : string;
  3. version : int;
  4. content : string;
}

Current state of a document.

module Req_id : sig ... end

Request ID.

module Make (IO : sig ... end) : sig ... end

Server interface for some IO substrate.

diff --git a/linol/Linol/index.html b/linol/Linol/index.html deleted file mode 100644 index e3de0919..00000000 --- a/linol/Linol/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Linol (linol.Linol)

Module Linol

Linol.

Abstraction over The "Lsp" library, to make it easier to develop LSP servers in OCaml (but not necessarily for OCaml).

module type IO = sig ... end
module Jsonrpc2 : sig ... end

Simple JSON-RPC2 implementation.

module Server : sig ... end

Server interface

module Blocking_IO : sig ... end

Blocking IO with a new thread for each spawn.

module Log = Log
module Make = Jsonrpc2.Make
val logs_src : Logs.src
diff --git a/linol/Linol/module-type-IO/index.html b/linol/Linol/module-type-IO/index.html deleted file mode 100644 index 59ffcd3b..00000000 --- a/linol/Linol/module-type-IO/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -IO (linol.Linol.IO)

Module type Linol.IO

type 'a t
val return : 'a -> 'a t
val failwith : string -> 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
type in_channel
type out_channel
val stdin : in_channel
val stdout : out_channel
val read : in_channel -> bytes -> int -> int -> unit t
val read_line : in_channel -> string t
val write : out_channel -> bytes -> int -> int -> unit t
val write_string : out_channel -> string -> unit t
val fail : exn -> unit t
val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t
diff --git a/linol/Linol__/index.html b/linol/Linol__/index.html deleted file mode 100644 index bd8a4e68..00000000 --- a/linol/Linol__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Linol__ (linol.Linol__)

Module Linol__

This module is hidden.

diff --git a/linol/Linol__Blocking_IO/index.html b/linol/Linol__Blocking_IO/index.html deleted file mode 100644 index 92cf5a94..00000000 --- a/linol/Linol__Blocking_IO/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Linol__Blocking_IO (linol.Linol__Blocking_IO)

Module Linol__Blocking_IO

This module is hidden.

diff --git a/linol/Linol__Common_/index.html b/linol/Linol__Common_/index.html deleted file mode 100644 index 002a493d..00000000 --- a/linol/Linol__Common_/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Linol__Common_ (linol.Linol__Common_)

Module Linol__Common_

This module is hidden.

diff --git a/linol/Linol__Jsonrpc2/index.html b/linol/Linol__Jsonrpc2/index.html deleted file mode 100644 index 74aef08a..00000000 --- a/linol/Linol__Jsonrpc2/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Linol__Jsonrpc2 (linol.Linol__Jsonrpc2)

Module Linol__Jsonrpc2

This module is hidden.

diff --git a/linol/Linol__Server/index.html b/linol/Linol__Server/index.html deleted file mode 100644 index c3fd31b7..00000000 --- a/linol/Linol__Server/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Linol__Server (linol.Linol__Server)

Module Linol__Server

This module is hidden.

diff --git a/linol/Linol__Sigs/index.html b/linol/Linol__Sigs/index.html deleted file mode 100644 index a1944575..00000000 --- a/linol/Linol__Sigs/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Linol__Sigs (linol.Linol__Sigs)

Module Linol__Sigs

This module is hidden.

diff --git a/linol/_doc-dir/CHANGES.md b/linol/_doc-dir/CHANGES.md deleted file mode 100644 index b1924ee2..00000000 --- a/linol/_doc-dir/CHANGES.md +++ /dev/null @@ -1,15 +0,0 @@ - -# 0.5 - -- api break: put `spawn` in the server itself, not `IO` - -- require OCaml 4.14 -- migrate to lsp 1.17 -- support inlay hints -- internal tracing with `trace` -- [#24] Expose get_uri for notify_back -- expose log source -- [#22] Threat shutdown and exit requests correctly -- [#20] Handle messages with null value for "params" field -- Handle server requests -- handle workDoneTokens diff --git a/linol/_doc-dir/README.md b/linol/_doc-dir/README.md deleted file mode 100644 index 18005461..00000000 --- a/linol/_doc-dir/README.md +++ /dev/null @@ -1,8 +0,0 @@ - -# Linol [![build](https://github.com/c-cube/linol/actions/workflows/main.yml/badge.svg)](https://github.com/c-cube/linol/actions/workflows/main.yml) - -This is a wrapper around the `lsp` library, which provides base types for the protocol. Linol ("linol is not ocaml-lsp") provides an object abstraction so that users can override only the methods they provide, and a Lwt implementation of the jsonrpc wire protocol. - -## License - -MIT license. diff --git a/linol/index.html b/linol/index.html deleted file mode 100644 index 748384a3..00000000 --- a/linol/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -index (linol.index)

Package linol

Package info

changes-files
readme-files
diff --git a/trace/Trace/index.html b/trace/Trace/index.html deleted file mode 100644 index db1abf5f..00000000 --- a/trace/Trace/index.html +++ /dev/null @@ -1,49 +0,0 @@ - -Trace (trace.Trace)

Module Trace

include module type of struct include Trace_core end
type span = int64

A span identifier.

The meaning of the identifier depends on the collector.

type user_data = [
  1. | `Int of int
  2. | `String of string
  3. | `Bool of bool
  4. | `Float of float
  5. | `None
]

User defined data, generally passed as key/value pairs to whatever collector is installed (if any).

type explicit_span = Trace_core.explicit_span = {
  1. span : span;
    (*

    Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.

    *)
  2. mutable meta : Trace_core.Meta_map.t;
    (*

    Metadata for this span (and its context)

    *)
}

Explicit span, with collector-specific metadata

module Collector = Trace_core.Collector
module Meta_map = Trace_core.Meta_map

Tracing

val enabled : unit -> bool

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) -> - 'a

with_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 enter_span : - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> - string -> - span
val exit_span : span -> unit
val add_data_to_span : span -> (string * user_data) list -> unit

Add structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.

  • since 0.4
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_span

Like 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.

  • parameter flavor

    a description of the span that can be used by the Collector.S to decide how to represent the span. Typically, `Sync spans start and stop on one thread, and are nested purely by their timestamp; and `Async spans can overlap, migrate between threads, etc. (as happens in Lwt, Eio, Async, etc.) which impacts how the collector might represent them.

  • since 0.3
val enter_manual_toplevel_span : - ?flavor:[ `Sync | `Async ] -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> - string -> - explicit_span

Like 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.

  • since 0.3
val exit_manual_span : explicit_span -> unit

Exit 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.

  • since 0.3
val add_data_to_manual_span : - explicit_span -> - (string * user_data) list -> - unit

add_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.

  • since 0.4
val message : - ?span:span -> - ?data:(unit -> (string * user_data) list) -> - string -> - unit

message msg logs a message msg (if a collector is installed). Additional metadata can be provided.

  • parameter span

    the surrounding span, if any. This might be ignored by the collector.

val messagef : - ?span:span -> - ?data:(unit -> (string * user_data) list) -> - ((('a, Stdlib.Format.formatter, unit, unit) format4 -> 'a) -> unit) -> - unit

messagef (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.

val set_thread_name : string -> unit

Give a name to the current thread. This might be used by the collector to display traces in a more informative way.

val set_process_name : string -> unit

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 -> - unit

Emit a counter of type int. Counters represent the evolution of some quantity over time.

  • parameter data

    metadata for this metric (since 0.4)

val counter_float : - ?data:(unit -> (string * user_data) list) -> - string -> - float -> - unit

Emit a counter of type float. See counter_int for more details.

  • parameter data

    metadata for this metric (since 0.4)

Collector

type collector = (module Collector.S)

An event collector.

See Collector for more details.

val setup_collector : collector -> unit

setup_collector c installs c as the current collector.

  • raises Invalid_argument

    if there already is an established collector.

val shutdown : unit -> unit

shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.

diff --git a/trace/Trace_core/Collector/index.html b/trace/Trace_core/Collector/index.html deleted file mode 100644 index b874369e..00000000 --- a/trace/Trace_core/Collector/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Collector (trace.Trace_core.Collector)

Module Trace_core.Collector

A 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.

val dummy_span : int64
val dummy_explicit_span : Trace_core__.Types.explicit_span
module type S = sig ... end

Signature for a collector.

diff --git a/trace/Trace_core/Collector/module-type-S/index.html b/trace/Trace_core/Collector/module-type-S/index.html deleted file mode 100644 index 0ba369ac..00000000 --- a/trace/Trace_core/Collector/module-type-S/index.html +++ /dev/null @@ -1,95 +0,0 @@ - -S (trace.Trace_core.Collector.S)

Module type Collector.S

Signature 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) -> - 'a

Run 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.

  • since 0.3
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 -> - int64

Enter a new implicit span. For many uses cases, with_span will be easier to use.

  • since NEXT_RELEASE
val exit_span : int64 -> unit

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.

  • since NEXT_RELEASE
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_span

Enter 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.

  • since 0.3
val exit_manual_span : Trace_core__.Types.explicit_span -> unit

Exit an explicit span.

  • since 0.3
val add_data_to_span : - int64 -> - (string - * [ `Int of int - | `String of string - | `Bool of bool - | `Float of float - | `None ]) - list -> - unit
  • since Adds data to the current span.

0.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 -> - unit

Adds data to the given span.

  • since 0.4
val message : - ?span:int64 -> - data: - (string - * [ `Int of int - | `String of string - | `Bool of bool - | `Float of float - | `None ]) - list -> - string -> - unit

Emit a message with associated metadata.

val name_thread : string -> unit

Give a name to the current thread.

val name_process : string -> unit

Give a name to the current process.

val counter_int : - data: - (string - * [ `Int of int - | `String of string - | `Bool of bool - | `Float of float - | `None ]) - list -> - string -> - int -> - unit

Integer counter.

val counter_float : - data: - (string - * [ `Int of int - | `String of string - | `Bool of bool - | `Float of float - | `None ]) - list -> - string -> - float -> - unit

Float counter.

val shutdown : unit -> unit

Shutdown collector, possibly waiting for it to finish sending data.

diff --git a/trace/Trace_core/Meta_map/Key/index.html b/trace/Trace_core/Meta_map/Key/index.html deleted file mode 100644 index 514498eb..00000000 --- a/trace/Trace_core/Meta_map/Key/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Key (trace.Trace_core.Meta_map.Key)

Module Meta_map.Key

Keys with a type witness.

type 'a t

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 t

Make 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.

val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types.

diff --git a/trace/Trace_core/Meta_map/index.html b/trace/Trace_core/Meta_map/index.html deleted file mode 100644 index a06a9dad..00000000 --- a/trace/Trace_core/Meta_map/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Meta_map (trace.Trace_core.Meta_map)

Module Trace_core.Meta_map

Associative containers with Heterogeneous Values

module Key : sig ... end

Keys with a type witness.

type pair =
  1. | Pair : 'a Key.t * 'a -> pair
type t

Immutable map from Key.t to values

val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val remove : _ Key.t -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
  • raises Not_found

    if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
diff --git a/trace/Trace_core/index.html b/trace/Trace_core/index.html deleted file mode 100644 index c60498eb..00000000 --- a/trace/Trace_core/index.html +++ /dev/null @@ -1,49 +0,0 @@ - -Trace_core (trace.Trace_core)

Module Trace_core

Trace.

type span = int64

A span identifier.

The meaning of the identifier depends on the collector.

type user_data = [
  1. | `Int of int
  2. | `String of string
  3. | `Bool of bool
  4. | `Float of float
  5. | `None
]

User defined data, generally passed as key/value pairs to whatever collector is installed (if any).

type explicit_span = {
  1. span : span;
    (*

    Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.

    *)
  2. mutable meta : Meta_map.t;
    (*

    Metadata for this span (and its context)

    *)
}

Explicit span, with collector-specific metadata

module Collector : sig ... end

A global collector.

module Meta_map : sig ... end

Associative containers with Heterogeneous Values

Tracing

val enabled : unit -> bool

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) -> - 'a

with_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 enter_span : - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> - string -> - span
val exit_span : span -> unit
val add_data_to_span : span -> (string * user_data) list -> unit

Add structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.

  • since 0.4
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_span

Like 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.

  • parameter flavor

    a description of the span that can be used by the Collector.S to decide how to represent the span. Typically, `Sync spans start and stop on one thread, and are nested purely by their timestamp; and `Async spans can overlap, migrate between threads, etc. (as happens in Lwt, Eio, Async, etc.) which impacts how the collector might represent them.

  • since 0.3
val enter_manual_toplevel_span : - ?flavor:[ `Sync | `Async ] -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> - string -> - explicit_span

Like 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.

  • since 0.3
val exit_manual_span : explicit_span -> unit

Exit 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.

  • since 0.3
val add_data_to_manual_span : - explicit_span -> - (string * user_data) list -> - unit

add_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.

  • since 0.4
val message : - ?span:span -> - ?data:(unit -> (string * user_data) list) -> - string -> - unit

message msg logs a message msg (if a collector is installed). Additional metadata can be provided.

  • parameter span

    the surrounding span, if any. This might be ignored by the collector.

val messagef : - ?span:span -> - ?data:(unit -> (string * user_data) list) -> - ((('a, Stdlib.Format.formatter, unit, unit) format4 -> 'a) -> unit) -> - unit

messagef (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.

val set_thread_name : string -> unit

Give a name to the current thread. This might be used by the collector to display traces in a more informative way.

val set_process_name : string -> unit

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 -> - unit

Emit a counter of type int. Counters represent the evolution of some quantity over time.

  • parameter data

    metadata for this metric (since 0.4)

val counter_float : - ?data:(unit -> (string * user_data) list) -> - string -> - float -> - unit

Emit a counter of type float. See counter_int for more details.

  • parameter data

    metadata for this metric (since 0.4)

Collector

type collector = (module Collector.S)

An event collector.

See Collector for more details.

val setup_collector : collector -> unit

setup_collector c installs c as the current collector.

  • raises Invalid_argument

    if there already is an established collector.

val shutdown : unit -> unit

shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.

diff --git a/trace/Trace_core__/index.html b/trace/Trace_core__/index.html deleted file mode 100644 index b7453930..00000000 --- a/trace/Trace_core__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Trace_core__ (trace.Trace_core__)

Module Trace_core__

This module is hidden.

diff --git a/trace/Trace_core__Atomic_/index.html b/trace/Trace_core__Atomic_/index.html deleted file mode 100644 index ea2e2250..00000000 --- a/trace/Trace_core__Atomic_/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Trace_core__Atomic_ (trace.Trace_core__Atomic_)

Module Trace_core__Atomic_

This module is hidden.

diff --git a/trace/Trace_core__Collector/index.html b/trace/Trace_core__Collector/index.html deleted file mode 100644 index 6b55115a..00000000 --- a/trace/Trace_core__Collector/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Trace_core__Collector (trace.Trace_core__Collector)

Module Trace_core__Collector

This module is hidden.

diff --git a/trace/Trace_core__Meta_map/index.html b/trace/Trace_core__Meta_map/index.html deleted file mode 100644 index d5882292..00000000 --- a/trace/Trace_core__Meta_map/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Trace_core__Meta_map (trace.Trace_core__Meta_map)

Module Trace_core__Meta_map

This module is hidden.

diff --git a/trace/Trace_core__Types/index.html b/trace/Trace_core__Types/index.html deleted file mode 100644 index 1626a378..00000000 --- a/trace/Trace_core__Types/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Trace_core__Types (trace.Trace_core__Types)

Module Trace_core__Types

This module is hidden.

diff --git a/trace/_doc-dir/CHANGES.md b/trace/_doc-dir/CHANGES.md deleted file mode 100644 index 1e393985..00000000 --- a/trace/_doc-dir/CHANGES.md +++ /dev/null @@ -1,46 +0,0 @@ - -# 0.6 - -- add `ppx_trace` for easier instrumentation. - * `let%trace span = "foo" in …` will enter a scope `span` named "foo" - * `let%trace () = "foo" in …` will enter a scope named "foo" with a hidden name -- add `trace-fuchsia` backend, which produces traces in the binary format - of [fuchsia](https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format). - These traces are reasonably efficient to produce (~60ns per span on my machines) - and reasonably compact on disk, at least compared to the TEF backend. - -# 0.5 - -- perf: reduce overhead in trace-tef -- perf: add Mpsc_queue, adapted from picos, to trace-tef - -# 0.4 - -- add `?data` to `counter_int` and `counter_float` -- add `float` to user data -- add `add_data_to_current_span` and `add_data_to_manual_span` -- make `explicit_span.meta` mutable -- trace-tef: write to `trace.json` if env variable `TRACE` is either 1 or true -- trace-tef: emit function name, if provided, as a metadata key/value pair -- re-export trace.core in trace - -- perf: in trace-tef, use broadcast instead of signal in the job queue - -# 0.3 - -- add explicit spans, for more precise tracing -- rename repo to ocaml-trace -- trace-tef: add a ticker thread to ensure we flush the file regularly - -# 0.2 - -- trace-tef: additional argument to `with_setup`; env for "stdout"/"stderr" -- refactor: avoid conflicting with stdlib `Trace` module by adding sublibrary `trace.core`. - Programs that use `compiler-libs.toplevel` should use `trace.core` - directly, because using `trace` will cause linking errors. -- perf(trace-tef): improve behavior of collector under contention by - pulling all events at once in the worker - -# 0.1 - -initial release diff --git a/trace/_doc-dir/README.md b/trace/_doc-dir/README.md deleted file mode 100644 index a7e030d8..00000000 --- a/trace/_doc-dir/README.md +++ /dev/null @@ -1,155 +0,0 @@ - -# Trace - -[![Build and Test](https://github.com/c-cube/ocaml-trace/actions/workflows/main.yml/badge.svg)](https://github.com/c-cube/ocaml-trace/actions/workflows/main.yml) - -This small library provides basic types that can be used to instrument -a library or application, either by hand or via a ppx. - -## Features - -- [x] spans -- [x] messages -- [x] counters -- [ ] other metrics? -- [x] ppx to help instrumentation - -## Usage - -To instrument your code, you can simply add `trace` to your dune/opam files, and then -write code like such: - -```ocaml -let f x = - Trace.with_span ~__FILE__ ~__LINE__ "inside-f" @@ fun _sp -> - (* … code for f *) - -let g x = - Trace.with_span ~__FILE__ ~__LINE__ "inside-g" @@ fun _sp -> - let y = f x in - (* … code for f *) - -let () = - Some_trace_backend.setup () @@ fun () -> - let result = g 42 in - print_result result -``` - -The file `test/t1.ml` follows this pattern, using `trace-tef` as a simple backend -that emits one JSON object per span/message: - -```ocaml -let run () = - Trace.set_process_name "main"; - Trace.set_thread_name "t1"; - - let n = ref 0 in - - for _i = 1 to 50 do - Trace.with_span ~__FILE__ ~__LINE__ "outer.loop" @@ fun _sp -> - for _j = 2 to 5 do - incr n; - Trace.with_span ~__FILE__ ~__LINE__ "inner.loop" @@ fun _sp -> - Trace.messagef (fun k -> k "hello %d %d" _i _j); - Trace.message "world"; - Trace.counter_int "n" !n - done - done - -let () = - Trace_tef.with_setup ~out:(`File "trace.json") () @@ fun () -> - run () -``` - -After running this, the file "trace.json" will contain something like: -```json -[{"pid":2,"name":"process_name","ph":"M","args": {"name":"main"}}, -{"pid":2,"tid": 3,"name":"thread_name","ph":"M","args": {"name":"t1"}}, -{"pid":2,"cat":"","tid": 3,"ts": 2.00,"name":"hello 1 2","ph":"I"}, -{"pid":2,"cat":"","tid": 3,"ts": 3.00,"name":"world","ph":"I"}, -{"pid":2,"tid":3,"ts":4.00,"name":"c","ph":"C","args": {"n":1}}, -… -``` - -Opening it in https://ui.perfetto.dev we get something like this: - -![screenshot of perfetto UI](media/ui.png) - -## ppx_trace - -On OCaml >= 4.12, and with `ppxlib` installed, you can install `ppx_trace`. -This is a preprocessor that will rewrite like so: - -```ocaml -let%trace f x y z = - do_sth x; - do_sth y; - begin - let%trace () = "sub-span" in - do_sth z - end -``` - -This more or less corresponds to: - -```ocaml -let f x y z = - let _trace_span = Trace_core.enter_span ~__FILE__ ~__LINE__ "Foo.f" in - match - do_sth x; - do_sth y; - begin - let _trace_span = Trace_core.enter_span ~__FILE__ ~__LINE__ "sub-span" in - match do_sth z with - | res -> - Trace_core.exit_span _trace_span; - res - | exception e -> - Trace_core.exit_span _trace_span - raise e - end; - with - | res -> - Trace_core.exit_span _trace_span - res - | exception e -> - Trace_core.exit_span _trace_span - raise e -``` - -Alternatively, a name can be provided for the span, which is useful if you want -to access it and use functions like `Trace.add_data_to_span`: - - -```ocaml -let%trace f x y z = - do_sth x; - do_sth y; - begin - let%trace _sp = "sub-span" in - do_sth z; - Trace.add_data_to_span _sp ["x", `Int 42] - end -``` - -### Dune configuration - -In your `library` or `executable` stanza, add: `(preprocess (pps ppx_trace))`. -The dependency on `trace.core` is automatically added. You still need to -configure a backend to actually do collection. - -## Backends - -Concrete tracing or observability formats such as: - -- [x] Fuchsia (see [the spec](https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format) and [tracing](https://github.com/janestreet/tracing). - Can be opened in https://ui.perfetto.dev) -- Catapult - * [x] light bindings here with `trace-tef`. - (Can be opened in https://ui.perfetto.dev) - * [ ] richer bindings with [ocaml-catapult](https://github.com/imandra-ai/catapult), - with multi-process backends, etc. -- [x] Tracy (see [ocaml-tracy](https://github.com/imandra-ai/ocaml-tracy), more specifically `tracy-client.trace`) -- [x] Opentelemetry (see [ocaml-opentelemetry](https://github.com/imandra-ai/ocaml-opentelemetry/), in `opentelemetry.trace`) -- [ ] landmarks? -- [ ] Logs (only for messages, obviously) diff --git a/trace/index.html b/trace/index.html deleted file mode 100644 index 341cb34b..00000000 --- a/trace/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -index (trace.index)

Package trace

Package info

changes-files
readme-files