Module Mavryk_protocol_environment_genesis.Error_monad

type error_category = [
  1. | `Branch
  2. | `Permanent
  3. | `Temporary
]
type error = ..
val pp : Format.formatter -> error -> unit
val error_encoding : error Data_encoding.t
val json_of_error : error -> Data_encoding.json
val error_of_json : Data_encoding.json -> error
type error_info = {
  1. category : error_category;
  2. id : string;
  3. title : string;
  4. description : string;
  5. schema : Data_encoding.json_schema;
}
val pp_info : Format.formatter -> error_info -> unit
val get_registered_errors : unit -> error_info list
val register_error_kind : error_category -> id:string -> title:string -> description:string -> ?pp:(Format.formatter -> 'err -> unit) -> 'err Data_encoding.t -> (error -> 'err option) -> ('err -> error) -> unit
val classify_errors : error list -> error_category
type !'a tzresult = ('a, error list) Pervasives.result
val result_encoding : 'a Data_encoding.t -> 'a tzresult Data_encoding.encoding
val ok : 'a -> 'a tzresult
val return : 'a -> 'a tzresult Lwt.t
val return_unit : unit tzresult Lwt.t
val return_none : 'a option tzresult Lwt.t
val return_some : 'a -> 'a option tzresult Lwt.t
val return_nil : 'a list tzresult Lwt.t
val return_true : bool tzresult Lwt.t
val return_false : bool tzresult Lwt.t
val error : error -> 'a tzresult
val fail : error -> 'a tzresult Lwt.t
val (>>?) : 'a tzresult -> ('a -> 'b tzresult) -> 'b tzresult
val (>>=?) : 'a tzresult Lwt.t -> ('a -> 'b tzresult Lwt.t) -> 'b tzresult Lwt.t
val (>>=) : 'a Lwt.t -> ('a -> 'b Lwt.t) -> 'b Lwt.t
val (>|=) : 'a Lwt.t -> ('a -> 'b) -> 'b Lwt.t
val (>>|?) : 'a tzresult Lwt.t -> ('a -> 'b) -> 'b tzresult Lwt.t
val (>|?) : 'a tzresult -> ('a -> 'b) -> 'b tzresult
val record_trace : error -> 'a tzresult -> 'a tzresult
val trace : error -> 'b tzresult Lwt.t -> 'b tzresult Lwt.t
val record_trace_eval : (unit -> error tzresult) -> 'a tzresult -> 'a tzresult
val trace_eval : (unit -> error tzresult Lwt.t) -> 'b tzresult Lwt.t -> 'b tzresult Lwt.t
val fail_unless : bool -> error -> unit tzresult Lwt.t
val fail_when : bool -> error -> unit tzresult Lwt.t
val iter_s : ('a -> unit tzresult Lwt.t) -> 'a list -> unit tzresult Lwt.t
val iter_p : ('a -> unit tzresult Lwt.t) -> 'a list -> unit tzresult Lwt.t
val map_s : ('a -> 'b tzresult Lwt.t) -> 'a list -> 'b list tzresult Lwt.t
val map_p : ('a -> 'b tzresult Lwt.t) -> 'a list -> 'b list tzresult Lwt.t
val map2 : ('a -> 'b -> 'c tzresult) -> 'a list -> 'b list -> 'c list tzresult
val map2_s : ('a -> 'b -> 'c tzresult Lwt.t) -> 'a list -> 'b list -> 'c list tzresult Lwt.t
val filter_map_s : ('a -> 'b option tzresult Lwt.t) -> 'a list -> 'b list tzresult Lwt.t
val fold_left_s : ('a -> 'b -> 'a tzresult Lwt.t) -> 'a -> 'b list -> 'a tzresult Lwt.t
val fold_right_s : ('a -> 'b -> 'b tzresult Lwt.t) -> 'a list -> 'b -> 'b tzresult Lwt.t
type !'a shell_tzresult = ('a, shell_error list) Pervasives.result