package coq-lsp

  1. Overview
  2. Docs
Language Server Protocol native server for Coq

Install

Dune Dependency

Authors

Maintainers

Sources

coq-lsp-0.1.5.1.8.16.tbz
sha256=bd1d61581eed552aef1b2a37442684a9f96240f1faaf695330c33391a8742a4a
sha512=44566902af1ef750d901527b4b9f5ef9872cfed88a935fe94a78e5a07692855949fed5d71e6709a19f5bf619cf3640391f393fdfeaa98834e72c35106af460c3

doc/src/coq-lsp.fleche/io.ml.html

Source file io.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
module CallBack = struct
  type t =
    { trace : string -> ?extra:string -> string -> unit
    ; send_diagnostics :
           ofmt:Format.formatter
        -> uri:Lang.LUri.File.t
        -> version:int
        -> Lang.Diagnostic.t list
        -> unit
    ; send_fileProgress :
           ofmt:Format.formatter
        -> uri:Lang.LUri.File.t
        -> version:int
        -> Progress.Info.t list
        -> unit
    }

  let default =
    { trace = (fun _ ?extra:_ _ -> ())
    ; send_diagnostics = (fun ~ofmt:_ ~uri:_ ~version:_ _ -> ())
    ; send_fileProgress = (fun ~ofmt:_ ~uri:_ ~version:_ _ -> ())
    }

  let cb = ref default
  let set t = cb := t
end

module Log = struct
  let trace d ?extra m = !CallBack.cb.trace d ?extra m

  let feedback feedback =
    if not (CList.is_empty feedback) then
      (* Put feedbacks content here? *)
      let extra = None in
      !CallBack.cb.trace "feedback" ?extra
        "feedback received in non-user facing place"
end

module Report = struct
  let diagnostics ~ofmt ~uri ~version d =
    !CallBack.cb.send_diagnostics ~ofmt ~uri ~version d

  let fileProgress ~ofmt ~uri ~version d =
    !CallBack.cb.send_fileProgress ~ofmt ~uri ~version d
end
OCaml

Innovation. Community. Security.