jon.recoil.org

Module OpamPackageSource

The package type, and package name type (name+version, values often called "nv" in the code)

Package name and versions

Sourcemodule Version : sig ... end

Versions

Sourcemodule Name : sig ... end

Names

Sourcetype t = private {
  1. name : OpamPackage.Name.t;
  2. version : OpamPackage.Version.t;
}

Package (name x version) pairs

include OpamStd.ABSTRACT with type t := OpamPackage.t
Sourceval of_string : string -> OpamPackage.t
Sourceval to_string : OpamPackage.t -> string
Sourcemodule Set : OpamStd.SET with type elt = OpamPackage.t
Sourcemodule Map : OpamStd.MAP with type key = OpamPackage.t

Return the package name

Sourceval of_string_opt : string -> OpamPackage.t option

Return None if nv is not a valid package name

Return the version name

Create a new pair (name x version)

Sourceval name_to_string : OpamPackage.t -> string

To fit in the GenericPackage type, for generic display functions

Sourceval version_to_string : OpamPackage.t -> string
Sourceval of_filename : OpamFilename.t -> OpamPackage.t option

Guess the package name from a filename. This function extracts name and version from /path/to/$name.$version/opam, or /path/to/$name.$version.opam

Sourceval of_dirname : OpamFilename.Dir.t -> OpamPackage.t option

Guess the package name from a directory name. This function extracts $name and $version from /path/to/$name.$version/

Sourceval of_archive : OpamFilename.t -> OpamPackage.t option

Guess the package name from an archive file. This function extract $name and $version from /path/to/$name.$version+opam.tar.gz

Convert a set of pairs to a map name -> versions

Returns the keys in a package map as a package set

Extract the versions from a collection of packages

Return the list of versions for a given package

Extract the naes from a collection of packages

Returns true if the set contains a package with the given name

Return all the packages with the given name

Sourceval packages_of_name_map : 'a OpamPackage.Map.t -> OpamPackage.Name.t -> 'a OpamPackage.Map.t

Return a package with the given name

Sourceval package_of_name_opt : OpamPackage.Set.t -> OpamPackage.Name.t -> OpamPackage.t option

Return a package with the given name, if any

Return all the packages with one of the given names

Removes all packages with the given name from a set of packages

Return the maximal available version of a package name from a set.

  • raises Not_found

    if no such package available.

Sourceval compare : OpamPackage.t -> OpamPackage.t -> int

Compare two packages

Sourceval equal : OpamPackage.t -> OpamPackage.t -> bool

Are two packages equal?

Sourceval hash : OpamPackage.t -> int

Hash a package

Return all the package descriptions in a given directory

Sourceval prefixes : OpamFilename.Dir.t -> string option OpamPackage.Map.t

Return all the package descriptions in the current directory (and their eventual prefixes).

Errors

Parallel executions.