package octez-libs
A package that contains multiple base libraries used by the Octez suite
Install
Dune Dependency
Authors
Maintainers
Sources
tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-libs.lwt-result-stdlib/Tezos_lwt_result_stdlib/Lwtreslib/Traced/index.html
Module Lwtreslib.Traced
Source
Traced
is a functor to generate advanced combined-monad replacements for parts of the Stdlib. The generated module is similar to Bare
with the addition of traces: structured collections of errors.
For convenience, the monad includes primitives to error directly with a trace rather than a bare error.
All the _ep
traversors return traces of errors rather than lists of errors. The _ep
traversors preserve their best-effort semantic.
Additional functions in the Monad
allow the construction of sequential traces: functions to enrich traces with new errors. E.g.,
let load_config file =
Result.map_error
(fun trace ->
Trace.cons "cannot load configuration file" trace)
@@ begin
let open Lwt_result_syntax in
let* file = open_file in
let* lines = read_lines file in
let* json = parse_config lines in
make_dictionary json
end
Example implementations of traces are provided in the traces/
directory.
Parameters
Signature
module Monad : TRACED_MONAD with type 'error trace = 'error Trace.trace
module Hashtbl :
Traced_sigs.Hashtbl.S with type 'error trace := 'error Trace.trace
module List : Traced_sigs.List.S with type 'error trace := 'error Trace.trace
module Map : Traced_sigs.Map.S with type 'error trace := 'error Trace.trace
module Option : Traced_sigs.Option.S
module Result : Traced_sigs.Result.S
module Seq : Traced_sigs.Seq.S with type 'error trace := 'error Trace.trace
module Seq_e : Traced_sigs.Seq_e.S
module Seq_s : Traced_sigs.Seq_s.S with type 'error trace := 'error Trace.trace
module Set : Traced_sigs.Set.S with type 'error trace := 'error Trace.trace
module Unit : Traced_sigs.Unit.S
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page