Module Odig_support.Pkg

module Pkg: sig .. end

Packages


Packages

type name = string 

The type for package names.

type t 

The type for packages.

val name : t -> name

name is the name of the package.

val path : t -> B0_std.Fpath.t

path is the path to the compilation objects of the package.

val equal : t -> t -> bool

equal p0 p1 is true if p0 and p1 point to the same package.

val compare : t -> t -> int

compare p0 p1 is a total order on packages compatible with Odig_support.Pkg.equal.

val compare_by_caseless_name : t -> t -> int

compare_by_caseless_name p0 p1 compares p0 and p1 by name in a caseless manner.

val pp : t B0_std.Fmt.t

pp formats packages.

val pp_name : t B0_std.Fmt.t

pp_name formats package names.

val pp_version : string B0_std.Fmt.t

pp_version formats a package version.

module Set: Set.S  with type elt = t

Package identifier sets.

module Map: Map.S  with type key = t

Package identifier maps.

Queries

val of_dir : B0_std.Fpath.t -> t list

of_dir libdir are the packages found in libdir. This is simply all the directory names inside libdir and an ocaml package which points to ocamlc -where.

val by_names : ?init:t B0_std.String.Map.t ->
t list -> t B0_std.String.Map.t

by_names pkgs indexes pkgs by module name and adds them to init (defaults to String.Map.empty.