Module Imandrakit_error.Data

Extensible data for errors.

Errors can contain arbitrary metadata in each level of its context, ie each message (as long as the metadata is serializable and printable).

module Twine = Imandrakit_twine
module Key : sig ... end
type 'a key = 'a Key.t
type t
val empty : t

Empty set of data

val add : 'a Key.t -> 'a -> t -> t

Add data of type 'a to the set

val is_empty : t -> bool

Is there nothing in the set?

val get : 'a Key.t -> t -> 'a option

Get data of type 'a using this key.

type binding =
  1. | B : 'a Key.t * 'a -> binding
val iter : t -> binding Iter.t