module Slot: sig .. endtype t = Printexc.backtrace_slot;
let is_raise: t => bool;
is_raise slot is true when slot refers to a raising
point in the code, and false when it comes from a simple
function call.
let is_inline: t => bool;
is_inline slot is true when slot refers to a call
that got inlined by the compiler, and false when it comes from
any other context.
let location: t => option(Printexc.location);
location slot returns the location information of the slot,
if available, and None otherwise.
Some possible reasons for failing to return a location are as follow:
-g)let name: t => option(string);
name slot returns the name of the function or definition
enclosing the location referred to by the slot.
name slot returns None if the name is unavailable, which
may happen for the same reasons as location returning None.
let format: (int, t) => option(string);
format pos slot returns the string representation of slot as
raw_backtrace_to_string would format it, assuming it is the
pos-th element of the backtrace: the 0-th element is
pretty-printed differently than the others.
Whole-backtrace printing functions also skip some uninformative
slots; in that case, format pos slot returns None.