Up

module Ir_merge

: sig

Merge operators.

The result monad

#
type 'a result = [
| `Ok of 'a
| `Conflict of string
]
#
module Result : Tc.S1 with type 'a t = 'a result
#
val bind : 'a result Lwt.t -> ('a -> 'b result Lwt.t) -> 'b result Lwt.t
#
val iter : ('a -> unit result Lwt.t) -> 'a list -> unit result Lwt.t
#
exception Conflict of string
#
val exn : 'a result -> 'a Lwt.t
#
module OP : sig
#
val ok : 'a -> 'a result Lwt.t
#
val conflict : ('a, unit, string, 'b result Lwt.t) Pervasives.format4 -> 'a
#
val (>>|) : 'a result Lwt.t -> ('a -> 'b result Lwt.t) -> 'b result Lwt.t
end

Merge functions

#
type 'a t = old:'a -> 'a -> 'a -> 'a result Lwt.t
#
val seq : 'a t list -> 'a t
#
val apply : ('a -> 'b t) -> 'a -> 'b t
#
val default : 'a Tc.t -> 'a t
#
val string : string t
#
type counter = int
#
val counter : counter t
#
module MSet : functor (M : Map.S) -> sig
#
val merge : counter M.t t
end
#
val some : 'a Tc.t -> 'a t -> 'a option t
#
val set : (module Set.S with type t = 'a) -> 'a t
#
val alist : 'a Tc.t -> 'b Tc.t -> 'b t -> ('a * 'b) list t
#
module Map : functor (M : Map.S) -> functor (K : Tc.S0 with type t = M.key) -> sig
#
val merge : 'a Tc.t -> 'a t -> 'a M.t t
end
#
val pair : 'a Tc.t -> 'b Tc.t -> 'a t -> 'b t -> ('a * 'b) t
#
val triple : 'a Tc.t -> 'b Tc.t -> 'c Tc.t -> 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
#
val biject : 'a Tc.t -> 'b t -> ('a -> 'b) -> ('b -> 'a) -> 'a t
#
val biject' : 'a Tc.t -> 'b t -> ('a -> 'b Lwt.t) -> ('b -> 'a Lwt.t) -> 'a t
end