From 35e89143c4c53239c63ea9c5e52e44cd4c1d78a2 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sat, 1 Apr 2023 21:48:40 -0400 Subject: [PATCH] basic docstrings --- src/blocking_IO.mli | 2 +- src/dune | 1 + src/jsonrpc2.ml | 3 --- src/jsonrpc2.mli | 4 ++++ src/linol.ml | 2 +- src/server.ml | 8 +++++--- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/blocking_IO.mli b/src/blocking_IO.mli index 5bd51dd4..8f87e62b 100644 --- a/src/blocking_IO.mli +++ b/src/blocking_IO.mli @@ -1,4 +1,4 @@ -(** {1 Blocking IO with a new thread for each [spawn]} *) +(** Blocking IO with a new thread for each [spawn]. *) include Sigs.IO diff --git a/src/dune b/src/dune index 8cb8c2a1..0fed119f 100644 --- a/src/dune +++ b/src/dune @@ -1,5 +1,6 @@ (library (name linol) (public_name linol) + (private_modules log) (flags :standard -warn-error -a+8) (libraries yojson lsp logs threads)) diff --git a/src/jsonrpc2.ml b/src/jsonrpc2.ml index 1b6ae6c2..ceae39e4 100644 --- a/src/jsonrpc2.ml +++ b/src/jsonrpc2.ml @@ -1,6 +1,3 @@ -(** {1 Simple JSON-RPC2 implementation} - See {{: https://www.jsonrpc.org/specification} the spec} *) - module J = Yojson.Safe module Err = Jsonrpc.Response.Error diff --git a/src/jsonrpc2.mli b/src/jsonrpc2.mli index 0ed2fe1f..8f0bc524 100644 --- a/src/jsonrpc2.mli +++ b/src/jsonrpc2.mli @@ -1,3 +1,7 @@ +(** Simple JSON-RPC2 implementation. + + See {{: https://www.jsonrpc.org/specification} the spec} *) + type json = Yojson.Safe.t module type IO = Sigs.IO diff --git a/src/linol.ml b/src/linol.ml index 549c9569..e91f6e86 100644 --- a/src/linol.ml +++ b/src/linol.ml @@ -1,4 +1,4 @@ -(** {1 Linol} +(** Linol. Abstraction over The "Lsp" library, to make it easier to develop LSP servers in OCaml (but not necessarily {b for} OCaml). *) diff --git a/src/server.ml b/src/server.ml index a25d397a..a7f16b17 100644 --- a/src/server.ml +++ b/src/server.ml @@ -1,3 +1,5 @@ +(** Server interface *) + open Sigs type nonrec doc_state = { @@ -8,9 +10,9 @@ type nonrec doc_state = { } (** Current state of a document. *) -(** {2 Request ID} +(** Request ID. - unique ID of a request, used by JSONRPC to map each request to its reply. *) + The unique ID of a request, used by JSONRPC to map each request to its reply. *) module Req_id = struct type t = Jsonrpc.Id.t @@ -20,7 +22,7 @@ module Req_id = struct | `Int i -> string_of_int i end -(** {2 Server interface for some IO substrate} *) +(** Server interface for some IO substrate. *) module Make (IO : IO) = struct open Lsp.Types module Position = Position