Mavryk_001_PtAtLas_test_helpers.Result_wrap_syntax
Extends the Result_syntax
with additional utilities for wrapping results produced by the protocol, i.e. Environment.Error_monad.tzresult
, to tzresult
values used in the tests.
The added utilities are binding operators. They use the same symbols as the ones from Result_syntax
with an added @
character. This character symbolizes the ewrapping
of the internal error monad type in a shell error.
include module type of Mavryk_base.TzPervasives.Result_syntax
include module type of Mavryk_error_monad.TzLwtreslib.Monad.Result_syntax
val tzfail :
'error ->
('a, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result
val and* :
('a, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result ->
('b, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result ->
('a * 'b, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result
val and+ :
('a, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result ->
('b, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result ->
('a * 'b, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result
val tzjoin :
(unit, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result list ->
(unit, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result
val tzall :
('a, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result list ->
('a list, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result
val tzboth :
('a, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result ->
('b, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result ->
('a * 'b, 'error Mavryk_base.TzPervasives.TzTrace.trace) Stdlib.result
val wrap :
'a Mavryk_protocol_001_PtAtLas.Environment.Error_monad.tzresult ->
'a Mavryk_base.TzPervasives.tzresult
wrap res
is equivalent to Environment.wrap_tzresult res
val let@ :
'a Mavryk_protocol_001_PtAtLas.Environment.Error_monad.tzresult ->
('a Mavryk_base.TzPervasives.tzresult -> 'b) ->
'b
let@ x = m in f x
is equivalent to let x = Environment.wrap_tzresult m in f x
val let*@ :
'a Mavryk_protocol_001_PtAtLas.Environment.Error_monad.tzresult ->
('a -> 'b Mavryk_base.TzPervasives.tzresult) ->
'b Mavryk_base.TzPervasives.tzresult
let*@ x = m in f x
is equivalent to let* x = Environment.wrap_tzresult m in f x
. Mnemonic: @
"wraps" a protocol error in a shell error.
val let+@ :
'a Mavryk_protocol_001_PtAtLas.Environment.Error_monad.tzresult ->
('a -> 'b) ->
'b Mavryk_base.TzPervasives.tzresult
let+@ x = m in f x
is equivalent to let+ x = Environment.wrap_tzresult m in f x
. Mnemonic: @
"wraps" a protocol error in a shell error.