Module Volgo_base

An extension of the Vcs library for use with Base.

volgo_base.Vcs is a module that extends the volgo.Vcs module with additional modules and functionalities, aimed to improve the compatibility of Vcs for programs using Base.

For example, it adds Comparable.S to all container keys modules so that they can be used with Base-style containers:

  let create_path_in_repo_table () = Hashtbl.create (module Vcs.Path_in_repo)

There's also a new module Vcs.Or_error which allows using Vcs with the Or_error monad.

The library is designed to be used as a drop-in replacement for Vcs. For this, it includes a single module named Vcs which must be setup to shadow the regular Vcs module.

You may do so by defining the following module alias in a place that's available to your scope:

  module Vcs = Volgo_base.Vcs

Another way to achieve this is to open Volgo_base via dune flags. When doing that, all the files in your library will use Volgo_base.Vcs consistently.

  (library
    (name my_library)
    (flags (:standard -open Volgo_base))
    (libraries volgo-base))

This pattern is Vcs's authors favorite way of using Volgo_base and is the way we're setting up Volgo_base in the examples of the Vcs repository.

module Vcs : sig ... end