package octez-proto-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13
doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/V5/Make/Option/index.html
Module Make.OptionSource
Signature from Lwtreslib's option module
val none_e : ('a option, 'trace) Pervasives.resultval none_s : 'a option Lwt.tval none_es : ('a option, 'trace) Pervasives.result Lwt.tval some_e : 'a -> ('a option, 'trace) Pervasives.resultval some_s : 'a -> 'a option Lwt.tval some_es : 'a -> ('a option, 'trace) Pervasives.result Lwt.tval value_e : 'a option -> error:'trace -> ('a, 'trace) Pervasives.resultval value_fe :
'a option ->
error:(unit -> 'trace) ->
('a, 'trace) Pervasives.resultval map_e :
('a -> ('b, 'trace) Pervasives.result) ->
'a option ->
('b option, 'trace) Pervasives.resultval map_es :
('a -> ('b, 'trace) Pervasives.result Lwt.t) ->
'a option ->
('b option, 'trace) Pervasives.result Lwt.tval iter_e :
('a -> (unit, 'trace) Pervasives.result) ->
'a option ->
(unit, 'trace) Pervasives.resultval iter_es :
('a -> (unit, 'trace) Pervasives.result Lwt.t) ->
'a option ->
(unit, 'trace) Pervasives.result Lwt.tval to_result : none:'trace -> 'a option -> ('a, 'trace) Pervasives.resultval of_result : ('a, 'e) Pervasives.result -> 'a optionval to_seq : 'a option -> 'a Seq.tcatch f is Some (f ()) if f does not raise an exception, it is None otherwise.
You should only use catch when you truly do not care about what exception may be raised during the evaluation of f (). If you need to inspect the raised exception, or if you need to pass it along, consider Result.catch instead.
If catch_only is set, then only exceptions e such that catch_only e is true are caught.
Whether catch_only is set or not, you cannot catch non-deterministic runtime exceptions of OCaml such as Stack_overflow and Out_of_memory nor system exceptions such as Unix.Unix_error.
catch_s f is a promise that resolves to Some x if and when f () resolves to x. Alternatively, it resolves to None if and when f () is rejected.
You should only use catch_s when you truly do not care about what exception may be raised during the evaluation of f (). If you need to inspect the raised exception, or if you need to pass it along, consider Result.catch_s instead.
If catch_only is set, then only exceptions e such that catch_only e is true are caught.
Whether catch_only is set or not, you cannot catch non-deterministic runtime exceptions of OCaml such as Stack_overflow and Out_of_memory nor system exceptions such as Unix.Unix_error.