package provider
Library
Module
Module type
Parameter
Class
Class type
Displaying debugging information about a trait.
This module provides a way to register, retrieve and display detailed information about a Trait, which can be useful for debugging and understanding the structure and behavior of the provider system.
This is meant for debugging purposes only.
A t
value includes a unique runtime id for the trait, as well as an optional name that may be registered by the user. The id is not shown by sexp_of_t
by default because its value can be brittle (it may depend on the order in which modules are evaluated). To display ids, see sexp_of_id
.
val sexp_of_t : t -> Sexplib0.Sexp.t
val sexp_of_id : (int -> Sexplib0.Sexp.t) ref
Controls whether the runtime ids are shown or hidden in the sexp built by sexp_of_t
. By default Fn.const (Sexp.Atom "#id")
. You may temporarily change it, e.g. in a test, for example using Ref.set_temporarily
.