Parameter Diagnostics.1-Result
module Input : S.SOLVER_INPUTinclude S.SELECTIONS with module Role = Input.Role and type command = Input.command and type dependency = Input.dependency and type command_name = Input.command_name and type dep_info = Input.dep_info and type requirements = Input.requirements
include S.CORE_MODEL
module Role : sig ... endtype commandA
commandis an entry-point provided by an implementation. Using a command may require extra dependencies (for example, a "test" command might depend on a test runner).
type command_name= private stringAn identifier for a command within a role. Note: It might not be necessary to use any commands - we could instead treat the command name as an optional part of the role, and treat each command as a separate impl instead.
type dep_info={dep_role : Role.t;dep_importance : [ `Essential | `Recommended | `Restricts ];dep_required_commands : command_name list;}type requirements={role : Role.t;command : command_name option;}
val requires : Role.t -> impl -> dependency list * command_name listGet an implementation's dependencies.
The dependencies should be ordered with the most important first. The solver will prefer to select the best possible version of an earlier dependency, even if that means selecting a worse version of a later one (
restricts_onlydependencies are ignored for this).An implementation or command can also bind to itself. e.g. "test" command that requires its own "run" command. We also return all such required commands.
val dep_info : dependency -> dep_infoval command_requires : Role.t -> command -> dependency list * command_name listAs
requires, but for commands.
val get_command : impl -> command_name -> command option
val to_map : t -> impl RoleMap.tval get_selected : Role.t -> t -> impl optionval selected_commands : impl -> command_name listval requirements : t -> requirements
val unwrap : impl -> Input.implval explain : t -> Role.t -> stringGet diagnostics-of-last-resort.