Integration_test_lib.Malleable_error
The is a monad which is conceptually similar to `Deferred.Or_error.t`, * except that there are 2 types of errors which can be returned at each bind * point in a computation: soft errors, and hard errors. Soft errors do not * effect the control flow of the monad, and are instead accumulated for later * extraction. Hard errors effect the control flow of the monad in the same * way an `Error` constructor for `Or_error.t` would. It remains similar to Deferred.Or_error.t in that it is a specialization of Deferred.Result.t
module Error_accumulator = Test_error.Error_accumulator
module Hard_fail : sig ... end
module Result_accumulator : sig ... end
type 'a t =
( 'a Result_accumulator.t, Hard_fail.t ) Async_kernel.Deferred.Result.t
module T : sig ... end
include module type of struct include T end
module Monad_infix = T.Monad_infix
val return : 'a -> 'a0 t
module Let_syntax = T.Let_syntax
val lift :
'a Async_kernel.Deferred.t ->
( 'b Result_accumulator.t, Hard_fail.t ) Core_kernel.Result.t
Async_kernel.Deferred.t
val soft_error :
value:'a ->
Core.Error.t ->
( 'b Result_accumulator.t, 'c ) Core_kernel.Result.t Async_kernel.Deferred.t
val hard_error :
?exit_code:int ->
Core.Error.t ->
( 'a, Hard_fail.t ) Core_kernel.Result.t Async_kernel.Deferred.t
val contextualize :
Core.String.Map.Key.t ->
( 'a Result_accumulator.t, Hard_fail.t ) Core_kernel._result
Async_kernel__Deferred.t ->
( 'a Result_accumulator.t, Hard_fail.t ) Core_kernel._result
Async_kernel__Deferred.t
val soften_error :
( unit Result_accumulator.t, Hard_fail.t ) Core_kernel._result
Async_kernel__Deferred.t ->
( unit Result_accumulator.t, 'a ) Core_kernel._result
Async_kernel__Deferred.t
val is_ok : ( 'a Result_accumulator.t, 'b ) Core_kernel._result -> bool
val ok_unit : unit t
val ok_if_true :
?error_type:[< `Hard | `Soft Hard ] ->
error:Core.Error.t ->
bool ->
( unit Result_accumulator.t, Hard_fail.t ) Core_kernel.Result.t
Async_kernel.Deferred.t
val or_soft_error :
value:'a ->
( 'b, Core.Error.t ) Core_kernel._result ->
'c t
val soft_error_string :
value:'a ->
string ->
( 'b Result_accumulator.t, 'c ) Core_kernel.Result.t Async_kernel.Deferred.t
val soft_error_format :
value:'a ->
( 'b,
unit,
string,
( 'c Result_accumulator.t, 'd ) Core_kernel.Result.t
Async_kernel.Deferred.t )
Stdlib.format4 ->
'e
val or_hard_error :
?exit_code:int ->
( 'a, Core.Error.t ) Core_kernel._result ->
'b t
val hard_error_string :
?exit_code:int ->
string ->
( 'a, Hard_fail.t ) Core_kernel.Result.t Async_kernel.Deferred.t
val hard_error_format :
?exit_code:int ->
( 'a,
unit,
string,
( 'b, Hard_fail.t ) Core_kernel.Result.t Async_kernel.Deferred.t )
Stdlib.format4 ->
'c
val lift_error_set :
'a t ->
( 'a0 * Test_error.internal_error Test_error.Set.t,
Test_error.internal_error Test_error.Set.t )
Async_kernel.Deferred.Result.t
val lift_error_set_unit :
unit t ->
Test_error.internal_error Test_error.Set.t Async_kernel.Deferred.t
module List : sig ... end