Module Vcs.Trait

The traits that Vcs depends on to implement its functionality.

Vcs is parametrized by a list of specific interfaces and classes that constitute the low level operations needed by Vcs. We call them traits.

The intended usage for a library that requires Vcs functionality is to specify via the type of the vcs value, the exact list of traits required. Doing this in this way, allows for flexibility, as any backend supplying that list of traits or more will be compatible as a backend to be supplied to your code.

For example, consider a function that needs to list all the files under version control, and show their contents at some revision. Such functionality will require:

  val my_vcs_function
    : vcs : < Vcs.Trait.ls_files ; Vcs.Trait.show ; .. > Vcs.t
    -> ..
    -> ..
class type add = Vcs__.Trait_add.t
module Add : sig ... end
class type branch = Vcs__.Trait_branch.t
module Branch : sig ... end
class type commit = Vcs__.Trait_commit.t
module Commit : sig ... end
class type config = Vcs__.Trait_config.t
module Config : sig ... end
class type file_system = Vcs__.Trait_file_system.t
module File_system : sig ... end
class type git = Vcs__.Trait_git.t
module Git : sig ... end
class type init = Vcs__.Trait_init.t
module Init : sig ... end
class type log = Vcs__.Trait_log.t
module Log : sig ... end
class type ls_files = Vcs__.Trait_ls_files.t
module Ls_files : sig ... end
class type name_status = Vcs__.Trait_name_status.t
module Name_status : sig ... end
class type num_status = Vcs__.Trait_num_status.t
module Num_status : sig ... end
class type refs = Vcs__.Trait_refs.t
module Refs : sig ... end
class type rev_parse = Vcs__.Trait_rev_parse.t
module Rev_parse : sig ... end
class type show = Vcs__.Trait_show.t
module Show : sig ... end
class type t = object ... end

The union of all traits defined in Vcs.