sig
  val of_string : string -> OpamTypes.repository
  val to_json : OpamTypes.repository -> OpamJson.t
  module Set :
    sig
      type elt = OpamTypes.repository
      type t
      val empty : t
      val is_empty : t -> bool
      val mem : elt -> t -> bool
      val add : elt -> t -> t
      val singleton : elt -> t
      val remove : elt -> t -> t
      val union : t -> t -> t
      val inter : t -> t -> t
      val diff : t -> t -> t
      val compare : t -> t -> int
      val equal : t -> t -> bool
      val subset : t -> t -> bool
      val iter : (elt -> unit) -> t -> unit
      val fold : (elt -> '-> 'a) -> t -> '-> 'a
      val for_all : (elt -> bool) -> t -> bool
      val exists : (elt -> bool) -> t -> bool
      val filter : (elt -> bool) -> t -> t
      val partition : (elt -> bool) -> t -> t * t
      val cardinal : t -> int
      val elements : t -> elt list
      val min_elt : t -> elt
      val max_elt : t -> elt
      val choose : t -> elt
      val split : elt -> t -> t * bool * t
      val map : (elt -> elt) -> t -> t
      val choose_one : t -> elt
      val of_list : elt list -> t
      val to_string : t -> string
      val to_json : t -> OpamJson.t
      val find : (elt -> bool) -> t -> elt
    end
  module Map :
    sig
      type key = OpamTypes.repository
      type +'a t
      val empty : 'a t
      val is_empty : 'a t -> bool
      val mem : key -> 'a t -> bool
      val add : key -> '-> 'a t -> 'a t
      val singleton : key -> '-> 'a t
      val remove : key -> 'a t -> 'a t
      val merge :
        (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
      val compare : ('-> '-> int) -> 'a t -> 'a t -> int
      val equal : ('-> '-> bool) -> 'a t -> 'a t -> bool
      val iter : (key -> '-> unit) -> 'a t -> unit
      val fold : (key -> '-> '-> 'b) -> 'a t -> '-> 'b
      val for_all : (key -> '-> bool) -> 'a t -> bool
      val exists : (key -> '-> bool) -> 'a t -> bool
      val filter : (key -> '-> bool) -> 'a t -> 'a t
      val partition : (key -> '-> bool) -> 'a t -> 'a t * 'a t
      val cardinal : 'a t -> int
      val bindings : 'a t -> (key * 'a) list
      val min_binding : 'a t -> key * 'a
      val max_binding : 'a t -> key * 'a
      val choose : 'a t -> key * 'a
      val split : key -> 'a t -> 'a t * 'a option * 'a t
      val find : key -> 'a t -> 'a
      val map : ('-> 'b) -> 'a t -> 'b t
      val mapi : (key -> '-> 'b) -> 'a t -> 'b t
      val to_string : ('-> string) -> 'a t -> string
      val to_json : ('-> OpamJson.t) -> 'a t -> OpamJson.t
      val values : 'a t -> 'a list
      val keys : 'a t -> key list
      val union : ('-> '-> 'a) -> 'a t -> 'a t -> 'a t
      val of_list : (key * 'a) list -> 'a t
    end
  exception Unknown_backend
  val default_address : OpamTypes.address
  val to_string : OpamTypes.repository -> string
  val compare : OpamTypes.repository -> OpamTypes.repository -> int
  val default : unit -> OpamTypes.repository
  val local : OpamTypes.dirname -> OpamTypes.repository
  val packages : OpamTypes.repository -> OpamTypes.package_set
  val packages_with_prefixes :
    OpamTypes.repository -> string option OpamTypes.package_map
  val compilers : OpamTypes.repository -> OpamTypes.compiler_set
  val compilers_with_prefixes :
    OpamTypes.repository -> string option OpamTypes.compiler_map
  val sort :
    OpamTypes.repository OpamTypes.repository_name_map ->
    OpamTypes.repository list
  val package_index :
    OpamTypes.repository OpamTypes.repository_name_map ->
    (OpamTypes.repository_name * string option) OpamTypes.package_map
  val compiler_index :
    OpamTypes.repository OpamTypes.repository_name_map ->
    (OpamTypes.repository_name * string option) OpamTypes.compiler_map
  val package_files :
    OpamTypes.repository ->
    string option ->
    OpamTypes.package -> archive:bool -> OpamTypes.filename list
  val package_state :
    OpamTypes.repository ->
    string option ->
    OpamTypes.package -> [ `all | `partial of bool ] -> OpamTypes.checksums
  val compiler_files :
    OpamTypes.repository ->
    string option -> OpamTypes.compiler -> OpamTypes.filename list
  val compiler_state :
    OpamTypes.repository ->
    string option -> OpamTypes.compiler -> OpamTypes.checksums
  val init : OpamTypes.repository -> unit
  val update : OpamTypes.repository -> unit
  module type BACKEND =
    sig
      val pull_url :
        OpamTypes.package ->
        OpamTypes.dirname ->
        string option ->
        OpamTypes.address -> OpamTypes.generic_file OpamTypes.download
      val pull_repo : OpamTypes.repository -> unit
      val pull_archive :
        OpamTypes.repository ->
        OpamTypes.filename -> OpamTypes.filename OpamTypes.download
      val revision : OpamTypes.repository -> OpamTypes.version option
    end
  val pull_url :
    OpamTypes.repository_kind ->
    OpamTypes.package ->
    OpamTypes.dirname ->
    string option ->
    OpamTypes.address -> OpamTypes.generic_file OpamTypes.download
  val pull_url_and_fix_digest :
    OpamTypes.repository_kind ->
    OpamTypes.package ->
    OpamTypes.dirname ->
    string ->
    OpamTypes.filename ->
    OpamTypes.address -> OpamTypes.generic_file OpamTypes.download
  val check_digest : OpamTypes.filename -> string option -> unit
  val pull_archive :
    OpamTypes.repository ->
    OpamTypes.package -> OpamTypes.filename OpamTypes.download
  val revision : OpamTypes.repository -> OpamTypes.version option
  val make_archive :
    ?gener_digest:bool ->
    OpamTypes.repository -> string option -> OpamTypes.package -> unit
  val register_backend :
    OpamTypes.repository_kind -> (module OpamRepository.BACKEND-> unit
  val find_backend :
    OpamTypes.repository_kind -> (module OpamRepository.BACKEND)
  module Parallel :
    sig
      module G :
        sig
          type t
          module V :
            sig
              type t = OpamTypes.repository
              val compare : t -> t -> int
              val hash : t -> int
              val equal : t -> t -> bool
              type label
              val create : label -> t
              val label : t -> label
            end
          type vertex = V.t
          module E :
            sig
              type t
              val compare : t -> t -> int
              type vertex = vertex
              val src : t -> vertex
              val dst : t -> vertex
              type label
              val create : vertex -> label -> vertex -> t
              val label : t -> label
            end
          type edge = E.t
          val is_directed : bool
          val is_empty : t -> bool
          val nb_vertex : t -> int
          val nb_edges : t -> int
          val out_degree : t -> vertex -> int
          val mem_vertex : t -> vertex -> bool
          val mem_edge : t -> vertex -> vertex -> bool
          val mem_edge_e : t -> edge -> bool
          val find_edge : t -> vertex -> vertex -> edge
          val find_all_edges : t -> vertex -> vertex -> edge list
          val succ : t -> vertex -> vertex list
          val pred : t -> vertex -> vertex list
          val succ_e : t -> vertex -> edge list
          val pred_e : t -> vertex -> edge list
          val fold_vertex : (vertex -> '-> 'a) -> t -> '-> 'a
          val iter_edges : (vertex -> vertex -> unit) -> t -> unit
          val fold_edges : (vertex -> vertex -> '-> 'a) -> t -> '-> 'a
          val iter_edges_e : (edge -> unit) -> t -> unit
          val fold_edges_e : (edge -> '-> 'a) -> t -> '-> 'a
          val map_vertex : (vertex -> vertex) -> t -> t
          val iter_pred : (vertex -> unit) -> t -> vertex -> unit
          val fold_succ : (vertex -> '-> 'a) -> t -> vertex -> '-> 'a
          val fold_pred : (vertex -> '-> 'a) -> t -> vertex -> '-> 'a
          val iter_succ_e : (edge -> unit) -> t -> vertex -> unit
          val fold_succ_e : (edge -> '-> 'a) -> t -> vertex -> '-> 'a
          val iter_pred_e : (edge -> unit) -> t -> vertex -> unit
          val fold_pred_e : (edge -> '-> 'a) -> t -> vertex -> '-> 'a
          val create : ?size:int -> unit -> t
          val clear : t -> unit
          val copy : t -> t
          val add_vertex : t -> vertex -> unit
          val remove_vertex : t -> vertex -> unit
          val add_edge : t -> vertex -> vertex -> unit
          val add_edge_e : t -> edge -> unit
          val remove_edge : t -> vertex -> vertex -> unit
          val remove_edge_e : t -> edge -> unit
          val iter_vertex : (V.t -> unit) -> t -> unit
          val iter_succ : (V.t -> unit) -> t -> V.t -> unit
          val in_degree : t -> V.t -> int
          val has_cycle : t -> bool
          val scc_list : t -> V.t list list
          val string_of_vertex : V.t -> string
        end
      val iter :
        int ->
        G.t ->
        pre:(G.V.t -> unit) ->
        child:(G.V.t -> unit) -> post:(G.V.t -> unit) -> unit
      val iter_l :
        int ->
        G.vertex list ->
        pre:(G.V.t -> unit) ->
        child:(G.V.t -> unit) -> post:(G.V.t -> unit) -> unit
      val map_reduce :
        int ->
        G.t -> map:(G.V.t -> 'a) -> merge:('-> '-> 'a) -> init:'-> 'a
      val map_reduce_l :
        int ->
        G.vertex list ->
        map:(G.V.t -> 'a) -> merge:('-> '-> 'a) -> init:'-> 'a
      val create : G.V.t list -> G.t
      exception Errors of (G.V.t * OpamParallel.error) list * G.V.t list
      exception Cyclic of G.V.t list list
    end
end