OpamTypesDefinitions of many types used throughout
type basename = OpamFilename.Base.tBasenames
type dirname = OpamFilename.Dir.tDirectory names (translated to absolute)
type filename = OpamFilename.tFilenames
type subpath = OpamFilename.SubPath.ttype filename_set = OpamFilename.Set.tSet of files
type 'a filename_map = 'a OpamFilename.Map.tMap of files
Predefined installation directories within a switch
Packages are (name * version) tuple
type package_set = OpamPackage.Set.tSet of packages
type 'a package_map = 'a OpamPackage.Map.tMap of packages
type name = OpamPackage.Name.tPackage names
type name_set = OpamPackage.Name.Set.tSet of package names
type 'a name_map = 'a OpamPackage.Name.Map.tMap of package names
type version = OpamPackage.Version.tPackage versions
type version_set = OpamPackage.Version.Set.tSet of package versions
type opam_version = OpamVersion.tOPAM versions
type variable = OpamVariable.tVariables
type full_variable = OpamVariable.Full.tFully qualified variables (ie. with the name of sections/sub-sections they appear in)
type variable_contents = OpamVariable.variable_contents = Content of user-defined variables
type variable_map = OpamVariable.variable_contents OpamVariable.Map.tA map from variables to their contents (i.e an environment)
type package_flag = | Pkgflag_LightUninstallThe package doesn't require downloading to uninstall
*)| Pkgflag_VerboseThe package's scripts output is to be displayed to the user
*)| Pkgflag_PluginThe package is an opam plugin that will install a opam-<name> exec, and may be auto-installed when doing opam <name>
| Pkgflag_CompilerPackage may be used for 'opam switch'
*)| Pkgflag_ConfVirtual package: no source, no install or remove instructions, .install, but likely has depexts
*)| Pkgflag_AvoidVersionThis version of the package will only be installed if strictly required
*)| Pkgflag_DeprecatedThis version of the package will only be installed if strictly required and will print a deprecation warning
*)| Pkgflag_Unknown of stringUsed for error reporting, otherwise ignored
*)Opam package flags
module type GenericPackage = sig ... endAt some point we want to abstract so that the same functions can be used over CUDF and OPAM packages
type 'a generic_formula = 'a OpamFormula.formula = | Empty| Atom of 'a| Block of 'a generic_formula| And of 'a generic_formula * 'a generic_formula| Or of 'a generic_formula * 'a generic_formulaA generic formula
type atom = OpamFormula.atomFormula atoms
type formula = OpamFormula.tFormula over versionned packages
type 'a conjunction = 'a OpamFormula.conjunctionAND formulat
type 'a disjunction = 'a OpamFormula.disjunctionOR formulat
type repository_name = OpamRepositoryName.tRepository names
type 'a repository_name_map = 'a OpamRepositoryName.Map.tMaps of repository names
type url = OpamUrl.tRepositories
type relop = OpamParserTypes.FullPos.relop_kindtype filter = | FBool of bool| FString of string| FIdent of name option list * variable * (string * string) optionpackages (or None for self-ref through "_"), variable name, string converter (val_if_true, val_if_false_or_undef)
*)| FOp of filter * relop * filter| FAnd of filter * filter| FOr of filter * filter| FNot of filter| FDefined of filter| FUndef of filterReturned by reduce functions when the filter could not be resolved to an atom (due to undefined variables or string expansions). The argument contains the partially reduced filter, where strings may still contain expansions (and are otherwise escaped). Used both for partial evaluation, and error messaging. Not allowed as an argument to other filters
*)These are first reduced to only the dependency-flag variables build, doc, dev, test defined in Opam formulas
type condition = filter filter_or_constraint generic_formulatype filtered_formula = (name * condition) OpamFormula.formulaUsed internally when computing sequences of actions
type 'a highlevel_action = [ | 'a atomic_action| `Change of [ `Up | `Down ] * 'a * 'a| `Reinstall of 'a ]Used to compact the atomic actions and display to the user in a more meaningful way
Sub-type of highlevel_action corresponding to an installed package that changed state or version
Used when applying solutions, separates build from install
type actions_result = {actions_successes : package action list;actions_errors : (package action * exn) list;actions_aborted : package action list;}Solver result
type solution_result = | Nothing_to_do| OK of package action listList of successful actions
*)| Aborted| Partial_error of actions_resulttype 'a request = {criteria : solver_criteria;wish_install : 'a OpamFormula.formula;wish_remove : 'a conjunction;wish_upgrade : 'a conjunction;wish_all : 'a conjunction;extra_attributes : string list;}Solver request
type universe = {u_packages : package_set;u_installed : package_set;u_available : package_set Stdlib.Lazy.t;u_depends : filtered_formula package_map;u_depopts : filtered_formula package_map;u_conflicts : formula package_map;u_action : user_action;u_installed_roots : package_set;u_pinned : package_set;u_invariant : formula;u_reinstall : package_set;u_attrs : (string * package_set Stdlib.Lazy.t) list;}Solver universe
Pin kind
Shell compatibility modes
type shell = OpamStd.Sys.shell = | SH_sh| SH_bash| SH_zsh| SH_csh| SH_fish| SH_pwsh of powershell_host| SH_cmdtype arg = simple_arg * filter optionCommand argument
type switch = OpamSwitch.tCompiler switches
type switch_set = OpamSwitch.Set.tSet of compiler switches
type 'a switch_map = 'a OpamSwitch.Map.tMap of compile switches
type switch_selections = {sel_installed : package_set;sel_roots : package_set;sel_compiler : package_set;sel_pinned : package_set;}type lock = | Read_lock of unit -> unitThe function does not modify anything, but it needs the state not to change while it is running.
*)| Global_lock of unit -> unitTake the global lock, all subsequent calls to OPAM are blocked.
*)| Switch_lock of unit -> switch * unit -> unitTake a global read lock and a switch lock. The first function is called with the read lock, then the second function is called with the returned switch write-locked.
*)| Global_with_switch_cont_lock of unit -> switch * (unit -> unit)Call the function in a global lock, then relax to a switch lock and call the function it returned
*)The different kinds of locks
type file_attribute = OpamFilename.Attribute.tA line in urls.tx
type file_attribute_set = OpamFilename.Attribute.Set.tAll the lines in urls.txt
Optional contents
Upgrade statistics
type env = (OpamStd.Env.Name.t * string * string option) listEnvironment variables: var name, value, optional comment
type path_format = | Hostuse host interpretation of path format
*)| Host_quoteduse host interpretation of path format and quote resulting path if it contains the separator character
*)| Targetuse the target interpretation of path format (opam file one)
*)| Target_quoteduse the target interpretation of path format (opam file one) and quote path if it contains the separator character
*)Transformation format for environment variable containing paths
type _ separator_path_format = | SPF_Resolved : (separator * path_format) option -> spf_resolved
separator_path_format| SPF_Unresolved : (separator * filter) generic_formula
* (path_format * filter) generic_formula -> spf_unresolved
separator_path_formatTransformation for environment variables containing paths. They are either unresolved at the beginning SPF_Unresolved, then propagated as resolved SPF_Resolved.
type _ env_update_op_kind = | Eq : [> euok_writeable ] env_update_op_kind| PlusEq : [> euok_writeable ] env_update_op_kind| EqPlus : [> euok_writeable ] env_update_op_kind| ColonEq : [> euok_writeable ] env_update_op_kind| EqColon : [> euok_writeable ] env_update_op_kind| EqPlusEq : [> euok_writeable ] env_update_op_kind| Cygwin : [> euok_internal ] env_update_op_kindtype ('a, 'b) env_update = {envu_var : string;envu_op : 'b env_update_op_kind;envu_value : string;envu_comment : string option;envu_rewrite : 'a separator_path_format option;}Environment updates
type tags = OpamStd.String.Set.t OpamStd.String.SetMap.tTags
type json = OpamJson.tJSON
type sys_package = OpamSysPkg.ttype sys_pkg_status = OpamSysPkg.status