package lsp
LSP protocol implementation in OCaml
Install
Dune Dependency
Authors
-
AAndrey Popp <8mayday@gmail.com>
-
RRusty Key <iam@stfoo.ru>
-
LLouis Roché <louis@louisroche.net>
-
OOleksiy Golovko <alexei.golovko@gmail.com>
-
RRudi Grinberg <me@rgrinberg.com>
-
SSacha Ayoun <sachaayoun@gmail.com>
-
Ccannorin <cannorin@gmail.com>
-
UUlugbek Abdullaev <ulugbekna@gmail.com>
-
Thibaut Mattio
-
MMax Lantas <mnxndev@outlook.com>
Maintainers
Sources
jsonrpc-1.8.2.tbz
sha256=420dfd5897d2a1da92e5d6a6c562d0f733871f711666c1741c00f57ef77dbd82
sha512=b9bdcffedf14c11daa2854b11fe28a14c9ed4bc9bdaf869be78fdb94f5954e038ef477ad91fab0a1e221916f232fa437b36cf6358e4adc62ac452b33ab6adc66
doc/src/lsp.stdune/table.ml.html
Source file table.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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
# 1 "submodules/dune/otherlibs/stdune-unstable/table.ml" module type Hashtbl = sig module Key : sig type t val equal : t -> t -> bool val hash : t -> int val to_dyn : t -> Dyn.t end module H : module type of Hashtbl.Make (Key) type value val value : value H.t end type ('input, 'output) t = (module Hashtbl with type value = 'output and type Key.t = 'input) module type Key = sig type t val equal : t -> t -> bool val hash : t -> int val to_dyn : t -> Dyn.t end let create (type key value) (module Key : Key with type t = key) size : (key, value) t = (module struct module Key = Key module H = Hashtbl.Make (Key) type nonrec value = value let value = H.create size end) let find (type input output) ((module T) : (input, output) t) x = T.H.find T.value x let find_exn (type input output) (t : (input, output) t) key = let (module T) = t in match find t key with | Some v -> v | None -> Code_error.raise "Table.find_exn: key doesn't exist" [ ("key", T.Key.to_dyn key) ] let set (type input output) ((module T) : (input, output) t) k v = T.H.set T.value k v let add_exn (type input output) (t : (input, output) t) k v = let (module T) = t in match find t k with | None -> set t k v | Some _ -> Code_error.raise "Table.add_exn: key already exists" [ ("key", T.Key.to_dyn k) ] let add t k v = match find t k with | None -> set t k v; Result.Ok () | Some e -> Error e let clear (type input output) ((module T) : (input, output) t) = T.H.clear T.value let mem (type input output) ((module T) : (input, output) t) k = T.H.mem T.value k let keys (type input output) ((module T) : (input, output) t) = T.H.keys T.value let foldi (type input output) ((module T) : (input, output) t) ~init ~f = T.H.foldi T.value ~init ~f let fold (type input output) ((module T) : (input, output) t) ~init ~f = T.H.fold T.value ~init ~f let to_dyn (type input output) (f : output -> Dyn.t) ((module T) : (input, output) t) = T.H.to_dyn f T.value let find_or_add (type input output) ((module T) : (input, output) t) (k : input) ~f = T.H.find_or_add T.value k ~f let remove (type input output) ((module T) : (input, output) t) k = T.H.remove T.value k let iter (type input output) ((module T) : (input, output) t) ~f = T.H.iter T.value ~f let filteri_inplace (type input output) ((module T) : (input, output) t) ~f = T.H.filteri_inplace T.value ~f let length (type input output) ((module T) : (input, output) t) = T.H.length T.value module Multi = struct let cons t x v = match find t x with | None -> set t x [ v ] | Some vs -> set t x (v :: vs) let find t x = match find t x with | None -> [] | Some s -> s end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>