3 -behavior(hope_gen_monad).
29 -spec map(t(A, Error), fun((A) -> (B))) ->
33 map({error, _}=Error, _) ->
41 , F :: fun((X) -> t(Ok, Error))
48 ; {ok, Y} -> pipe(Fs, Y)
51 -spec lift_exn(F) -> G
52 when F :: fun((A)-> B)
53 , G :: fun((A)-> t(B, {Class, Reason :: any()}))
58 lift_exn(F) when is_function(F, 1) ->
63 {error, {Class, Reason}}
67 -spec lift_exn(F, Label) -> G
68 when F :: fun((A)-> B)
69 , G :: fun((A)-> t(B, {Label, {Class, Reason :: any()}}))
74 lift_exn(F, Label) when is_function(F, 1) ->
79 {error, {Label, {Class, Reason}}}