package odig

  1. Overview
  2. Docs

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 -> B00_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 B00_std.Fmt.t

pp formats packages.

val pp_name : t B00_std.Fmt.t

pp_name formats package names.

val pp_version : string B00_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 : B00_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 B00_std.String.Map.t -> t list -> t B00_std.String.Map.t

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

OCaml

Innovation. Community. Security.