Module Topkg.R
Result value combinators.
Errors
val reword_error : ('b -> 'c) -> ('a, 'b) Result.result -> ('a, 'c) Result.resultreword_error reword ris:rifr = Ok vError (reword e)ifr = Error e
Error messages
val error_msg : string -> ('b, [> msg ]) Result.resulterror_msg sisError (`Msg s).
val error_msgf : ('a, Stdlib.Format.formatter, unit, ('b, [> msg ]) Result.result) Stdlib.format4 -> 'aerror_msgf fmt ...is an error formatted according tofmt.
val reword_error_msg : ?replace:bool -> (string -> msg) -> ('a, msg) Result.result -> ('a, [> msg ]) Result.resultreword_error_msg ~replace reword ris likereword_errorexcept ifreplaceisfalse(default), the result ofreword old_msgis concatened, on a new line to the old message.