Up

module Impl

: sig

An implementation represents a single concrete implementation of an interface. There can be several implementations with the same version number (e.g. for different architectures, languages or ABIs).

Types

*

#
type importance = [
| `essential
| `recommended
| `restricts
]
#
type distro_retrieval_method = {
# distro_size
: Int64.t option;
# distro_install_info
: string * string;
}
#
type package_state = [
| `installed
| `uninstalled of distro_retrieval_method
]
#
type package_impl = {
# package_distro
: string;
# mutable package_state
: package_state;
}
#
type cache_impl = {
# digests
: Manifest.digest list;
# retrieval_methods
: Support.Qdom.element list;
}
#
type impl_type = [
| `cache_impl of cache_impl
| `local_impl of Support.Common.filepath
| `package_impl of package_impl
]
#
type restriction = < meets_restriction : impl_type t -> bool; to_string : string >
#
type dependency = {
# dep_qdom
: Element.dependency_node Element.t;
# dep_importance
: importance;
# dep_iface
: General.iface_uri;
# dep_src
: bool;
# dep_restrictions
: restriction list;
# dep_required_commands
: string list;
# dep_if_os
: string option;
# dep_use
: string option;
}
#
type command = {
# mutable command_qdom
: Support.Qdom.element;
# command_requires
: dependency list;
# command_bindings
: Element.binding_node Element.t list;
}
#
type properties = {
# attrs
: Support.Qdom.AttrMap.t;
# requires
: dependency list;
# bindings
: Element.binding_node Element.t list;
# commands
: command Support.Common.StringMap.t;
}
#
type +'a t = {
# qdom
: Support.Qdom.element;
# props
: properties;
# stability
: General.stability_level;
# os
: string option;
# machine
: string option;
# parsed_version
: Version.t;
# impl_type
: ([< ] as 'a);
}
#
type generic_implementation = impl_type t
#
type distro_implementation = [
| `package_impl of package_impl
] t
#
val parse_stability : from_user:bool -> string -> General.stability_level

Utility functions

#
val format_stability : General.stability_level -> string
#
val make_command : ?source_hint:Support.Qdom.element -> string -> ?new_attr:string -> Support.Common.filepath -> command
#
val make_distribtion_restriction : string -> restriction
#
val make_version_restriction : string -> restriction
#
val parse_dep : Support.Common.filepath option -> [< ] Element.t -> dependency

parse_dep local_dir elem parses the <requires>/<restricts> element. local_dir is used to resolve relative interface names in local feeds (use None for remote feeds).

#
val parse_command : Support.Common.filepath option -> [
| `command
] Element.t -> command

parse_command local_dir elem parses the <command> element. local_dir is used to process dependencies (see parse_dep).

#
val get_attr_ex : string -> _ t -> string
#
val is_source : _ t -> bool
#
val get_command_opt : string -> _ t -> command option
#
val get_command_ex : string -> _ t -> command
#
val get_langs : _ t -> Support.Locale.lang_spec list
#
val is_available_locally : General.config -> _ t -> bool
#
val is_retrievable_without_network : cache_impl -> bool
#
val get_id : _ t -> Feed_url.global_id
#
val fmt : unit -> _ t -> string

Formats the XML element and location, for debug logging with %a.

end