Module Odig_support.Pkg



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 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 : Stdlib.Set.S with type elt = t

Package identifier sets.

module Map : Stdlib.Map.S with type key = t

Package identifier maps.


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

of_dir lib_dir are the packages found in lib_dir. This is simply all the directory names inside lib_dir 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.