Module Diagnostic


module Diagnostic: sig .. end
One un-installability reason for a package

module OcamlHash: Hashtbl
include struct ... end

type reason =
| Dependency of (Cudf.package * Cudf_types.vpkg list * Cudf.package list) (*Not strictly a un-installability, Dependency (a,vpkglist,pkglist) is used to recontruct the the dependency path from the root package to the offending un-installable package*)
| Missing of (Cudf.package * Cudf_types.vpkg list) (*Missing (a,vpkglist) means that the dependency vpkglist of package a cannot be satisfied*)
| Conflict of (Cudf.package * Cudf.package * Cudf_types.vpkg) (*Conflict (a,b,vpkg) means that the package a is in conflict with package b because of vpkg*)
One un-installability reason for a package

type request =
| Package of Cudf.package (*Check the installability of one package*)
| PackageList of Cudf.package list (*Check the installability of a list of packages*)
The request provided to the solver

type result =
| Success of (?all:bool -> unit -> Cudf.package list) (*If successfull returns a function that will return the installation set for the given query. Since not all packages are tested for installability directly, the installation set might be empty. In this case, the solver can be called again to provide the real installation set using the parameter ~all:true*)
| Failure of (unit -> reason list) (*If unsuccessful returns a function containing the list of reason*)
The result of an installability query

type diagnosis = {
   result : result;
   request : request;
}
module ResultHash: OcamlHash.Make(sig
type t = Diagnostic.reason 
val equal : Diagnostic.reason -> Diagnostic.reason -> bool
val hash : Diagnostic.reason -> int
end)

type summary = {
   mutable missing : int;
   mutable conflict : int;
   mutable unique_missing : int;
   mutable unique_conflict : int;
   summary : Cudf.package list Pervasives.ref ResultHash.t;
}
val default_result : int -> summary
val build_paths : (Cudf.package * 'a * Cudf.package list) list ->
Cudf.package -> (Cudf.package * 'a) list list
given a list of dependencies, return a list of list containg all * paths in the dependency tree starting from root
val pp_package : ?source:bool ->
('a -> string * string * (string * string) list) ->
Format.formatter -> 'a -> unit
val pp_vpkglist : (Cudf.package -> string * string * 'a) ->
Format.formatter ->
(Cudf_types.pkgname *
([< `Eq | `Geq | `Gt | `Leq | `Lt | `Neq ] * Cudf_types.version) option)
list -> unit
val pp_dependency : (Cudf.package -> string * string * (string * string) list) ->
?label:string ->
Format.formatter ->
Cudf.package *
(Cudf_types.pkgname *
([< `Eq | `Geq | `Gt | `Leq | `Lt | `Neq ] * Cudf_types.version) option)
list -> unit
val pp_list : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a list -> unit
val create_pathlist : Cudf.package ->
reason list -> (Cudf.package * Cudf_types.vpkg list) list list
val pp_dependencies : (Cudf.package -> string * string * (string * string) list) ->
Format.formatter ->
(Cudf.package *
(Cudf_types.pkgname *
([< `Eq | `Geq | `Gt | `Leq | `Lt | `Neq ] * Cudf_types.version) option)
list)
list list -> unit
val print_error : (Cudf.package -> string * string * (string * string) list) ->
Cudf.package -> Format.formatter -> reason list -> unit
val minimize : request -> Cudf.package list -> Cudf.package list
val default_pp : Cudf.package -> Cudf_types.pkgname * string * 'a list
val fprintf : ?pp:(Cudf.package -> Cudf_types.pkgname * string * (string * string) list) ->
?failure:bool ->
?success:bool ->
?explain:bool ->
?minimal:bool -> Format.formatter -> diagnosis -> unit
val printf : ?pp:(Cudf.package -> Cudf_types.pkgname * string * (string * string) list) ->
?failure:bool ->
?success:bool -> ?explain:bool -> diagnosis -> unit
val is_solution : diagnosis -> bool
val add : 'a list Pervasives.ref ResultHash.t ->
ResultHash.key -> 'a -> unit
val collect : summary -> diagnosis -> unit
val pp_summary_row : (Cudf.package -> string * string * (string * string) list) ->
Format.formatter -> reason * Cudf.package list -> unit
val pp_summary : ?pp:(Cudf.package -> Cudf_types.pkgname * string * (string * string) list) ->
unit -> Format.formatter -> summary -> unit