package opam-state

  1. Overview
  2. Docs

Module OpamPinnedSource

Specific query and handling of pinned packages

Sourceval version : 'a OpamStateTypes.switch_state -> OpamTypes.name -> OpamTypes.version

Returns the version the package is pinned to.

Sourceval package : 'a OpamStateTypes.switch_state -> OpamTypes.name -> OpamTypes.package

Returns the package with the pinned-to version from a pinned package name.

Sourceval package_opt : 'a OpamStateTypes.switch_state -> OpamTypes.name -> OpamTypes.package option

Returns the package with the pinned-to version from a package name, if pinned

Sourceval packages : 'a OpamStateTypes.switch_state -> OpamTypes.package_set

The set of all pinned packages with their pinning versions

Sourceval find_opam_file_in_source : ?locked:bool -> OpamTypes.name -> OpamTypes.dirname -> OpamFile.OPAM.t OpamFile.t option

Looks up an 'opam' file for the given named package in a source directory. if locked is true, look for a locked file.

Sourceval files_in_source : ?recurse:bool -> ?subpath:string -> OpamTypes.dirname -> (OpamTypes.name option * OpamFile.OPAM.t OpamFile.t * string option) list

Finds all package definition files in a given source dir opam, pkgname.opam/opam, etc. This is affected by OpamStateConfig.(!r.locked)

Sourceval name_of_opam_filename : OpamTypes.dirname -> OpamTypes.filename -> OpamTypes.name option

From an opam file location, sitting below the given project directory, find the corresponding package name if specified (<name>.opam or <name>.opam/opam). This function doesn't check the project directory name itself, or the package name that might be specified within the file.

Sourceval orig_opam_file : 'a OpamStateTypes.switch_state -> OpamPackage.Name.t -> OpamFile.OPAM.t -> OpamFile.OPAM.t OpamFile.t option

Finds back the location of the opam file this package definition was loaded from

OCaml

Innovation. Community. Security.