package dune-private-libs

  1. Overview
  2. Docs
Private libraries of Dune

Install

Dune Dependency

Authors

Maintainers

Sources

dune-2.5.1.tbz
sha256=8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b
sha512=f209f12ced10c1abf8782bdb0143f4cec77795f7174d2cc75130afb1e01550b01f2f77b9e3ec4888efdad83d2f9878d179b39126f824f4e522f3ef4da34bf27e

doc/dune-private-libs.stdune/Stdune/Result/index.html

Module Stdune.Result

Result type

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 : sig ... end
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 Dyn.Encoder.t -> 'error Dyn.Encoder.t -> ('a, 'error) t Dyn.Encoder.t
val errorf : ('a, unit, string, (_, string) t) format4 -> 'a

Produce Error <message>

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

For compatibility with some other code

module List : sig ... end
module Option : sig ... end
OCaml

Innovation. Community. Security.