Module Model.Make

Parameters

Signature

include Zeroinstall_solver.S.SOLVER_INPUT with type rejection = Context.rejection
module Role : sig ... end
type impl
type command
type command_name = private string
type dependency
type dep_info = {
  1. dep_role : Role.t;
  2. dep_importance : [ `Essential | `Recommended | `Restricts ];
  3. dep_required_commands : command_name list;
}
type requirements = {
  1. role : Role.t;
  2. command : command_name option;
}
val requires : Role.t -> impl -> dependency list * command_name list
val dep_info : dependency -> dep_info
val command_requires : Role.t -> command -> dependency list * command_name list
val get_command : impl -> command_name -> command option
type role_information = {
  1. replacement : Role.t option;
  2. impls : impl list;
}
type restriction
type machine_group = private string
val pp_impl : Stdlib.Format.formatter -> impl -> unit
val pp_command : Stdlib.Format.formatter -> command -> unit
val implementations : Role.t -> role_information
val restrictions : dependency -> restriction list
val meets_restriction : impl -> restriction -> bool
val machine_group : impl -> machine_group option
type conflict_class = private string
val conflict_class : impl -> conflict_class list
type rejection = Context.rejection
val rejects : Role.t -> (impl * rejection) list * string list
val compare_version : impl -> impl -> int
val pp_version : Stdlib.Format.formatter -> impl -> unit
val user_restrictions : Role.t -> restriction option
val pp_impl_long : Stdlib.Format.formatter -> impl -> unit
val format_machine : impl -> string
val string_of_restriction : restriction -> string
val describe_problem : impl -> rejection -> string
val dummy_impl : impl
val role : Context.t -> OpamPackage.Name.t -> Role.t
val version : impl -> OpamPackage.t option

version impl is the Opam package for impl, if any. Virtual and dummy implementations return None.

val virtual_role : impl list -> Role.t

virtual_role impls is a virtual package name with candidates impls. This is used if the user requests multiple packages on the command line (the single impl will also be virtual).

val virtual_impl : context:Context.t -> depends:OpamPackage.Name.t list -> unit -> impl

virtual_impl ~context ~depends () is a virtual package which just depends on depends. This is used if the user requests multiple packages on the command line - each requested package becomes a dependency of the virtual implementation.

val package_name : Role.t -> OpamPackage.Name.t option

package_name role is the Opam package name for role, if any. Return None on virtual roles.

val formula : restriction -> [ `Ensure | `Prevent ] * OpamFormula.version_formula

formula restriction returns the version formula represented by this restriction along with its negation status: (`Prevent, formula) roughly means not formula.