Module Terminal.Call_trace

type 'a element = {
  1. loc : 'a;
  2. msg : string;
}
val mk_element : loc:'a -> ?msg:string -> unit -> 'a element
val pp_element : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a element -> unit
type 'a t = 'a element list
val empty : 'a t
val singleton : loc:'a -> ?msg:string -> unit -> 'a t
val pp : (Stdlib.Format.formatter -> 'a -> unit) -> 'a element list Fmt.t
val rename : ?rev:bool -> int -> string -> 'a element list -> 'a element list

rename ?rev idx msg trace renames the element at idx with the message msg. If there is no element at idx, returns the input trace. If rev is true, index 0 corresponds to the root of the trace; otherwise index 0 is the top (most recent element) of the trace.