package dune

  1. Overview
  2. Docs
Fast, portable and opinionated build system

Install

Dune Dependency

Authors

Maintainers

Sources

dune-build-info-1.11.4.tbz
sha256=77cb5f483221b266ded2b85fc84173ae0089a25134a086be922e82c131456ce6
sha512=02f00fd872aa49b832fc8c1e928409f23c79ddf84a53009a58875f222cca36fbb92c905e12c539caec9cbad723f195a8aa24218382dca35a903b3f52b11f06f2

doc/dune._stdune/Stdune/Result/index.html

Module Stdune.Result

Result type

type ('a, 'error) t = ('a, 'error) Dune_caml.result =
  1. | Ok of 'a
  2. | Error of 'error
val ok : 'a -> ('a, _) t
val is_ok : (_, _) t -> bool
val is_error : (_, _) t -> bool
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 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.