Module Internal_pervasives.Attached_result

A “decorated result type” based on polymorphic variants

type content = [
  1. | `Text of string
  2. | `String_value of string
  3. | `Verbatim of string list
  4. | `String_list of string list
]
type ('ok, 'error) t = {
  1. result : ('ok, 'error) Result.t;
  2. attachments : (string * content) list;
}
val ok : ?attachments:(string * content) list -> 'a -> ('b, 'c) t
val error : ?attachments:(string * content) list -> 'a -> ('b, 'c) t
val pp : Stdlib.Format.formatter -> ?pp_ok:(Stdlib.Format.formatter -> 'a -> unit) -> ?pp_error:(Stdlib.Format.formatter -> 'b -> unit) -> ('c, 'd) t -> unit