module type ERROR_MONAD = sig
.. end
The basic error monad signature.
type ('a, 'b)
t
val return : 'a -> ('a, 'b) t
val bind : ('a, 'b) t ->
('a -> ('c, 'b) t) -> ('c, 'b) t
val (>>=) : ('a, 'b) t ->
('a -> ('c, 'b) t) -> ('c, 'b) t
val fail : 'b -> ('a, 'b) t
val map : ('a, 'b) t -> ('a -> 'c) -> ('c, 'b) t
val (>>|) : ('a, 'b) t -> ('a -> 'c) -> ('c, 'b) t
val destruct : ('a, 'b) t ->
([> `Error of 'b | `Ok of 'a ] -> ('c, 'd) t) ->
('c, 'd) t
val (>><) : ('a, 'b) t ->
([> `Error of 'b | `Ok of 'a ] -> ('c, 'd) t) ->
('c, 'd) t