package lsp

  1. Overview
  2. Docs
LSP protocol implementation in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

jsonrpc-1.6.1.tbz
sha256=bccc0d7194714a4c40c362766ad9095d3c58505a1d4f1dc4becd9b3d1bda8209
sha512=199bee8c74aec6822bc83bf9a7c3757206bdaa55a19cd1f5cf480127618a078baa1e917f6a90a6135a5277e4eb87977e685c10e6503f546997e6b985949e190f

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

Module Stdune.ResultSource

Result type

Sourcetype ('a, 'error) t = ('a, 'error) result =
  1. | Ok of 'a
  2. | Error of 'error
Sourceval return : 'a -> ('a, _) t
Sourceval ok : 'a -> ('a, _) t
Sourceval value : ('a, 'e) result -> default:'a -> 'a

value r ~default is v if r is Ok v and default otherwise.

Sourceval is_ok : (_, _) t -> bool
Sourceval is_error : (_, _) t -> bool
Sourceval iter : ('a, _) t -> f:('a -> unit) -> unit
Sourceval ok_exn : ('a, exn) t -> 'a
Sourceval try_with : (unit -> 'a) -> ('a, exn) t
Sourceval equal : ('a -> 'a -> bool) -> ('b -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t -> bool
Sourceval hash : ('a -> int) -> ('b -> int) -> ('a, 'b) t -> int
Sourcemodule O : sig ... end
Sourceval map : ('a, 'error) t -> f:('a -> 'b) -> ('b, 'error) t
Sourceval bind : ('a, 'error) t -> f:('a -> ('b, 'error) t) -> ('b, 'error) t
Sourceval (>>=) : ('a, 'error) t -> ('a -> ('b, 'error) t) -> ('b, 'error) t
Sourceval map_error : ('a, 'error1) t -> f:('error1 -> 'error2) -> ('a, 'error2) t
Sourceval to_option : ('a, 'error) t -> 'a option
Sourceval to_dyn : 'a Dyn.Encoder.t -> 'error Dyn.Encoder.t -> ('a, 'error) t Dyn.Encoder.t
Sourceval errorf : ('a, unit, string, (_, string) t) format4 -> 'a

Produce Error <message>

Sourcetype ('a, 'error) result = ('a, 'error) t

For compatibility with some other code

Sourcemodule List : sig ... end
Sourcemodule Option : sig ... end
OCaml

Innovation. Community. Security.