package lsp

  1. Overview
  2. Docs
LSP protocol implementation in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

jsonrpc-1.4.1.tbz
sha256=cee8371e7048e24c90e916c373ef6f3aba6f474d8a5fcf507ab6650fd8575eeb
sha512=150ebf71d3484d3beec1a145877cf30d84581bd072dd20159e878ed07cc4fc647b019b98bb0c9fede839b87f7bd13de4a64b534c0760a2ec57d0e4a4deac6f0f

doc/lsp.stdune/Stdune/Table/index.html

Module Stdune.TableSource

Hashtable with a simple polymorphic type, but without the polymorphic equality.

This module re-wraps the hashtable implementation provided by Hashtbl.Make under a different interface: we just have a single type ('k, 'v) t, similar to a polymorphic hashtable.

This means that if you want a hash table generic over the type of keys, you don't have to put your type inside a functor.

Unlike the polymorphich hashtable (('k, 'v) Hashtbl.t), this does not use polymorphic hash and polymorphic equality, so this module does respect abstraction boundaries.

Sourcetype ('k, 'v) t
Sourcemodule type Key = sig ... end
Sourceval create : (module Key with type t = 'k) -> int -> ('k, 'v) t
Sourceval find : ('k, 'v) t -> 'k -> 'v option
Sourceval find_exn : ('k, 'v) t -> 'k -> 'v
Sourceval set : ('k, 'v) t -> 'k -> 'v -> unit
Sourceval add_exn : ('k, 'v) t -> 'k -> 'v -> unit
Sourceval add : ('k, 'v) t -> 'k -> 'v -> (unit, 'v) Result.t
Sourceval clear : ('k, 'v) t -> unit
Sourceval mem : ('k, _) t -> 'k -> bool
Sourceval keys : ('k, _) t -> 'k list
Sourceval foldi : ('k, 'v) t -> init:'init -> f:('k -> 'v -> 'init -> 'init) -> 'init
Sourceval fold : (_, 'v) t -> init:'init -> f:('v -> 'init -> 'init) -> 'init
Sourceval to_dyn : ('v -> Dyn.t) -> (_, 'v) t -> Dyn.t
Sourceval find_or_add : ('k, 'v) t -> 'k -> f:('k -> 'v) -> 'v
Sourceval remove : ('k, _) t -> 'k -> unit
Sourceval iter : (_, 'v) t -> f:('v -> unit) -> unit
Sourceval filteri_inplace : ('a, 'b) t -> f:(key:'a -> data:'b -> bool) -> unit
Sourceval length : (_, _) t -> int
OCaml

Innovation. Community. Security.