package lsp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Stdune.Result end
type ('a, 'error) t = ('a, 'error) result =
  1. | Ok of 'a
  2. | Error of 'error
val return : 'a -> ('a, _) t
val ok : 'a -> ('a, _) t
val is_ok : (_, _) t -> bool
val is_error : (_, _) t -> bool
val iter : ('a, _) t -> f:('a -> unit) -> unit
val ok_exn : ('a, exn) t -> 'a
val try_with : (unit -> 'a) -> ('a, exn) t
val equal : ('a -> 'a -> bool) -> ('b -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t -> bool
val hash : ('a -> int) -> ('b -> int) -> ('a, 'b) t -> int
module O = Stdune.Result.O
val map : ('a, 'error) t -> f:('a -> 'b) -> ('b, 'error) t
val bind : ('a, 'error) t -> f:('a -> ('b, 'error) t) -> ('b, 'error) t
val (>>=) : ('a, 'error) t -> ('a -> ('b, 'error) t) -> ('b, 'error) t
val map_error : ('a, 'error1) t -> f:('error1 -> 'error2) -> ('a, 'error2) t
val to_option : ('a, 'error) t -> 'a option
val to_dyn : 'a Stdune.Dyn.Encoder.t -> 'error Stdune.Dyn.Encoder.t -> ('a, 'error) t Stdune.Dyn.Encoder.t
type ('a, 'error) result = ('a, 'error) t

For compatibility with some other code

module List = Stdune.Result.List
module Option = Stdune.Result.Option
val errorf : ('a, Format.formatter, unit, ('b, string) t) format4 -> 'a
OCaml

Innovation. Community. Security.