package ocamlformat-rpc-lib

  1. Overview
  2. Docs
module type Command_S = sig ... end
module type Client_S = sig ... end
module type V = sig ... end
module Init : Command_S with type t = [ `Halt | `Unknown | `Version of string ]

Version used to set the protocol version

module V1 : V with type Command.t = [ `Halt | `Unknown | `Error of string | `Config of (string * string) list | `Format of string ]
type client = [
  1. | `V1 of V1.Client.t
]
val pick_client : pid:int -> in_channel -> out_channel -> string list -> (client, [ `Msg of string ]) result

pick_client ~pid in out versions returns the most-fitting client according to a list of versions, that is a list ordered from the most to the least wished version.

val pid : client -> int
val halt : client -> (unit, [> `Msg of string ]) result
val config : (string * string) list -> client -> (unit, [> `Msg of string ]) result
val format : string -> client -> (string, [> `Msg of string ]) result