OpamListCommandSourceFunctions handling the "opam list" subcommand
type dependency_toggles = {recursive : bool;depopts : bool;build : bool;post : bool;test : bool;dev_setup : bool;doc : bool;dev : bool;}Switches to determine what to include when querying (reverse) dependencies
type pattern_selector = {case_sensitive : bool;exact : bool;glob : bool;fields : string list;ext_fields : bool;Match on raw strings in x-foo fields
}type selector = | Any| Installed| Root| Compiler| Available| Installable| Pinned| Latests_only| Depends_on of dependency_toggles * OpamTypes.atom list| Required_by of dependency_toggles * OpamTypes.atom list| Conflicts_with of OpamTypes.package list| Coinstallable_with of dependency_toggles * OpamTypes.package list| Solution of dependency_toggles * OpamTypes.atom list| Pattern of pattern_selector * string| Atoms of OpamTypes.atom list| Flag of OpamTypes.package_flag| NotFlag of OpamTypes.package_flag| Tag of string| From_repository of OpamTypes.repository_name list| Owns_file of OpamTypes.filenamePackage selectors used to filter the set of packages
Returns true if the selector might require depexts availibility information when applied using filter. Returns false otherwise.
val filter :
base:OpamTypes.package_set ->
'a OpamStateTypes.switch_state ->
selector OpamFormula.formula ->
OpamTypes.package_setApplies a formula of selectors to filter the package from a given switch state
Or-filter on package patterns (NAME or NAME.VERSION)
Get the aggregated active external dependencies of the given packages
Lists the given aggregated active external dependencies of the given packages
type output_format = | NameName without version
*)| VersionVersion of the currently looked-at package
*)| Packagename.version
| SynopsisOne-line package description
*)| Synopsis_or_targetPinning target if pinned, synopsis otherwise
*)| DescriptionThe package description, excluding synopsis
*)| Field of stringThe value of the given opam-file field
*)| Raw_field of stringThe raw value of the given opam-file field
*)| Installed_versionInstalled version or "--" if none
*)| Pinning_targetEmpty string if not pinned
*)| Source_hashThe VC-reported ident of current version, for dev packages. Empty if not available
*)| RawThe full contents of the opam file (reformatted)
*)| All_installed_versionsList of the installed versions in all switches with the corresponding switches in brackets
*)| Available_versionsList of the available versions (currently installed one in bold if color enabled)
*)| All_versionsList of the existing package versions (installed, installed in current switch and unavailable colored specifically if color enabled)
*)| RepositoryThe repository the package was found in (may be empty for pinned packages)
*)| Installed_filesThe list of files that the installed package added to the system
*)| VC_refThe version-control branch or tag the package url is bound to, if any
*)| DepextsThe external dependencies
*)Element of package information to be printed. Fixme: should be part of the run-time man!
val get_switch_state :
'a OpamStateTypes.global_state ->
'a OpamStateTypes.repos_state ->
OpamStateTypes.unlocked OpamStateTypes.switch_stateGets either the current switch state, if a switch is selected, or a virtual state corresponding to the configured repos
For documentation, includes a dummy '<field>:' for the Field format. Used for the --columns argument.
For documentation, includes a dummy '<field>:' and '<field>' for the Field format. Used for the --field argument.
type package_listing_format = {short : bool;header : bool;columns : output_format list;all_versions : bool;wrap : [ `Wrap of string | `Truncate | `None ] option;separator : string;value_printer : [ `Normal | `Pretty | `Normalised ];order : [ `Standard
| `Dependency
| `Custom of OpamTypes.package -> OpamTypes.package -> int ];}val display :
'a OpamStateTypes.switch_state ->
package_listing_format ->
OpamTypes.package_set ->
unitOutputs a list of packages as a table according to the formatting options. normalise supersedes prettify and uses a canonical way of displaying package definition file fields. prettify uses a nicer to read format for the package definition file fields.
val info :
'a OpamStateTypes.switch_state ->
fields:string list ->
raw:bool ->
where:bool ->
?normalise:bool ->
?show_empty:bool ->
?all_versions:bool ->
?sort:bool ->
OpamTypes.atom list ->
unitDisplay a general summary of a collection of packages.
val mini_field_printer :
?prettify:bool ->
?normalise:bool ->
OpamParserTypes.FullPos.value ->
stringPrints the value of an opam field in a shortened way (with prettify -- the default -- puts lists of strings in a format that is easier to read