| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
module type Kind = |
| 32 |
sig |
| 33 |
type 'a t |
| 34 |
val master : 'a t |
| 35 |
end |
| 36 |
|
| 37 |
module type S = sig |
| 38 |
|
| 39 |
module Branch : |
| 40 |
sig |
| 41 |
type t |
| 42 |
val make : string -> t |
| 43 |
val equal : t -> t -> bool |
| 44 |
val compare : t -> t -> int |
| 45 |
val to_string : t -> string |
| 46 |
val master : t |
| 47 |
end |
| 48 |
|
| 49 |
type id |
| 50 |
|
| 51 |
type 'a kind_gen |
| 52 |
type kind = Branch.t kind_gen |
| 53 |
|
| 54 |
type branch_info = { |
| 55 |
kind : kind; |
| 56 |
root : id; |
| 57 |
pos : id; |
| 58 |
} |
| 59 |
|
| 60 |
type ('diff,'info,'property_data) t |
| 61 |
|
| 62 |
val empty : id -> ('diff,'info,'property_data) t |
| 63 |
|
| 64 |
val current_branch : ('e,'i,'c) t -> Branch.t |
| 65 |
val branches : ('e,'i,'c) t -> Branch.t list |
| 66 |
|
| 67 |
val get_branch : ('e,'i,'c) t -> Branch.t -> branch_info |
| 68 |
val reset_branch : ('e,'i,'c) t -> Branch.t -> id -> ('e,'i,'c) t |
| 69 |
val branch : |
| 70 |
('e,'i,'c) t -> ?root:id -> ?pos:id -> |
| 71 |
Branch.t -> kind -> ('e,'i,'c) t |
| 72 |
val delete_branch : ('e,'i,'c) t -> Branch.t -> ('e,'i,'c) t |
| 73 |
val merge : |
| 74 |
('diff,'i,'c) t -> id -> ours:'diff -> theirs:'diff -> ?into:Branch.t -> |
| 75 |
Branch.t -> ('diff,'i,'c) t |
| 76 |
val commit : ('diff,'i,'c) t -> id -> 'diff -> ('diff,'i,'c) t |
| 77 |
val rewrite_merge : |
| 78 |
('diff,'i,'c) t -> id -> ours:'diff -> theirs:'diff -> at:id -> |
| 79 |
Branch.t -> ('diff,'i,'c) t |
| 80 |
val checkout : ('e,'i,'c) t -> Branch.t -> ('e,'i,'c) t |
| 81 |
|
| 82 |
val set_info : ('e,'info,'c) t -> id -> 'info -> ('e,'info,'c) t |
| 83 |
val get_info : ('e,'info,'c) t -> id -> 'info option |
| 84 |
|
| 85 |
|
| 86 |
module Dag : Dag.S with type node = id |
| 87 |
val dag : ('diff,'info,'cdata) t -> ('diff,'info,'cdata) Dag.t |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
val create_property : ('e,'i,'c) t -> id list -> 'c -> ('e,'i,'c) t |
| 92 |
val property_of : ('e,'i,'c) t -> id -> 'c Dag.Property.t list |
| 93 |
val delete_property : ('e,'i,'c) t -> 'c Dag.Property.t -> ('e,'i,'c) t |
| 94 |
|
| 95 |
|
| 96 |
val gc : ('e,'info,'c) t -> ('e,'info,'c) t * Dag.NodeSet.t |
| 97 |
val reachable : ('e,'info,'c) t -> id -> Dag.NodeSet.t |
| 98 |
|
| 99 |
|
| 100 |
end |
| 101 |
|
| 102 |
module Make(OT : Map.OrderedType)(K : Kind) : S |
| 103 |
with type id = OT.t |
| 104 |
and type Dag.node = OT.t |
| 105 |
and type 'a kind_gen = 'a K.t |
| 106 |
and type Dag.NodeSet.t = Set.Make(OT).t |
| 107 |
and type Dag.NodeSet.elt = OT.t |
| 108 |
|