package plebeia

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

1 Result monad

type ('a, 'z) t = ('a, 'z) Result.t Lwt.t
val return : 'a -> ('a, 'z) t
val bind : ('a, 'z) t -> ('a -> ('b, 'z) t) -> ('b, 'z) t
val map : ('a -> 'b) -> ('a, 'z) t -> ('b, 'z) t
val mapM : ('a -> ('b, 'z) t) -> 'a list -> ('b list, 'z) t
val mapM_ : ('a -> (unit, 'z) t) -> 'a list -> (unit, 'z) t
val fold_leftM : ('a -> 'b -> ('a, 'z) t) -> 'a -> 'b list -> ('a, 'z) t
val map_error : ('err1 -> 'err2) -> ('a, 'err1) t -> ('a, 'err2) t
val from_Ok_lwt : ('a, _) t -> 'a Lwt.t

It raises Failure _ when the argument is Error _.

val from_Error_lwt : (_, 'e) t -> 'e Lwt.t

It raises Failure _ when the argument is Ok _.

val default : ('a, 'e) t -> ('e -> 'a) -> 'a Lwt.t

Error recovery

val errorf : ('a, unit, string, ('b, string) t) Stdlib.format4 -> 'a

Printf interface to produce a string error

module Infix : sig ... end
module Syntax : sig ... end
OCaml

Innovation. Community. Security.