Library
Module
Module type
Parameter
Class
Class type
This type is meant to be substituted/constrained. The intended use is along the following lines:
module Foo : sig
include CORE
include MONAD with type error := error
end = struct
...
end
See core.mli and monad.mli as examples.
type trace = error list
A trace
is a stack of error
s. It is implemented as an error list
but such a list MUST NEVER be empty.
It is implemented as a concrete error list
for backwards compatibility but future improvements might modify the type or render the type abstract.
val pp_print_error : Format.formatter -> trace -> unit
val trace_encoding : trace Data_encoding.t
val classify_errors : trace -> error_category
val result_encoding : 'a Data_encoding.t -> 'a tzresult Data_encoding.t
A serializer for result of a given type
val ok : 'a -> 'a tzresult
Sucessful result
Enrich an error report (or do nothing on a successful result) manually
Automatically enrich error reporting on stack rewind
Same as record_trace, for unevaluated error
Same as trace, for unevaluated Lwt error
val _assert :
bool ->
string ->
('a, Format.formatter, unit, unit tzresult Lwt.t) format4 ->
'a
In-monad list iterators
A List.map2
in the monad
A List.filter_map
in the monad
A List.filter
in the monad
A List.fold_left
in the monad
A List.fold_right
in the monad