package tezos-base

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

Module TzPervasives.TzTraceSource

TzTrace: trace module specific to the Tezos Error monad. The trace type of this module is meant to become abstract in the medium-term (see https://gitlab.com/tezos/tezos/-/issues/1577).

The trace type (included as part of the Tezos_lwt_result_stdlib.Lwtreslib.TRACE module is abstract in this interface but it is made concrete in the instantiated error monad (see error_monad.mli).

The idea of abstracting the trace is so that it can evolve more easily. Eventually, we can make the trace abstract in the instantiated error monad, we can have different notions of traces for the protocol and the shell, etc.

include Tezos_lwt_result_stdlib.Lwtreslib.TRACE with type 'error trace = 'error list
Sourcetype 'error trace = 'error list
Sourceval make : 'error -> 'error trace
Sourceval cons : 'error -> 'error trace -> 'error trace
Sourceval cons_list : 'error -> 'error list -> 'error trace
Sourceval conp : 'error trace -> 'error trace -> 'error trace
Sourceval conp_list : 'err trace -> 'err trace list -> 'err trace
Sourceval pp_print : (Format.formatter -> 'err -> unit) -> Format.formatter -> 'err trace -> unit

pp_print pretty-prints a trace of errors

Sourceval pp_print_top : (Format.formatter -> 'err -> unit) -> Format.formatter -> 'err trace -> unit

pp_print_top pretty-prints the top errors of the trace

Sourceval encoding : 'error Data_encoding.t -> 'error trace Data_encoding.t
Sourceval fold : ('a -> 'error -> 'a) -> 'a -> 'error trace -> 'a

fold f init trace traverses the trace (in an unspecified manner) so that init is folded over each of the error within trace by f. Typical use is to find the worst error, to check for the presence of a given error, etc.

OCaml

Innovation. Community. Security.