(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* t val equal : t -> t -> bool val compare : t -> t -> int val to_string : t -> string val master : t end type id type 'a kind_gen type kind = Branch.t kind_gen type branch_info = { kind : kind; root : id; pos : id; } type ('diff,'info,'property_data) t val empty : id -> ('diff,'info,'property_data) t val current_branch : ('e,'i,'c) t -> Branch.t val branches : ('e,'i,'c) t -> Branch.t list val get_branch : ('e,'i,'c) t -> Branch.t -> branch_info val reset_branch : ('e,'i,'c) t -> Branch.t -> id -> ('e,'i,'c) t val branch : ('e,'i,'c) t -> ?root:id -> ?pos:id -> Branch.t -> kind -> ('e,'i,'c) t val delete_branch : ('e,'i,'c) t -> Branch.t -> ('e,'i,'c) t val merge : ('diff,'i,'c) t -> id -> ours:'diff -> theirs:'diff -> ?into:Branch.t -> Branch.t -> ('diff,'i,'c) t val commit : ('diff,'i,'c) t -> id -> 'diff -> ('diff,'i,'c) t val rewrite_merge : ('diff,'i,'c) t -> id -> ours:'diff -> theirs:'diff -> at:id -> Branch.t -> ('diff,'i,'c) t val checkout : ('e,'i,'c) t -> Branch.t -> ('e,'i,'c) t val set_info : ('e,'info,'c) t -> id -> 'info -> ('e,'info,'c) t val get_info : ('e,'info,'c) t -> id -> 'info option (* Read only dag *) module Dag : Dag.S with type node = id val dag : ('diff,'info,'cdata) t -> ('diff,'info,'cdata) Dag.t (* Properties are not a concept typical of a VCS, but a useful metadata * of a DAG (or graph). *) val create_property : ('e,'i,'c) t -> id list -> 'c -> ('e,'i,'c) t val property_of : ('e,'i,'c) t -> id -> 'c Dag.Property.t list val delete_property : ('e,'i,'c) t -> 'c Dag.Property.t -> ('e,'i,'c) t (* Removes all unreachable nodes and returns them *) val gc : ('e,'info,'c) t -> ('e,'info,'c) t * Dag.NodeSet.t val reachable : ('e,'info,'c) t -> id -> Dag.NodeSet.t end module Make(OT : Map.OrderedType)(K : Kind) : S with type id = OT.t and type Dag.node = OT.t and type 'a kind_gen = 'a K.t and type Dag.NodeSet.t = Set.Make(OT).t and type Dag.NodeSet.elt = OT.t