package dkml-install
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=9c2fc122d49103ce9bf513fcc11b443d
sha512=c746d7a4482109c725bfe44542c146914add4d77e8e76556ce0de6e2567683a7ac7dc9909f1252aea7facbcf130153b8e752607a3c44e35b8cfd8ea5d99eb356
doc/dkml-install.register/Dkml_install_register/Component_registry/index.html
Module Dkml_install_register.Component_registrySource
The Component_registry is a global registry of all components that have been registered until now.
Component authors should follow this sequence:
open Dkml_install_api
module Component : Component_config = struct
include Default_component_config
let component_name = "...the..component..name..."
(** Redefine any other values you want to override *)
end
let reg = Component_registry.get ()
let () = Component_registry.add_component reg (module Component : Component_config)The type of the component registry
The type of the component selector. Either all components, or just the specified components plus all of their dependencies.
val add_component :
?raise_on_error:bool ->
t ->
(module Dkml_install_api.Component_config) ->
unitadd_component ?raise_on_error registry component adds the component to the registry.
Ordinarily if there is an error a process exit is performed. Set raise_on_error to true to raise an Invalid_argument error instead.
validate ?raise_on_error registry succeeds if and only if all dependencies of all add_component registry have been themselves added.
Ordinarily if there is an error a process exit is performed. Set raise_on_error to true to raise an Invalid_argument error instead.
val eval :
t ->
selector:component_selector ->
f:
((module Dkml_install_api.Component_config) ->
'a Dkml_install_api.Forward_progress.t) ->
fl:Dkml_install_api.Forward_progress.fatal_logger ->
'a list Dkml_install_api.Forward_progress.teval registry ~f ~fl iterates through the registry in dependency order, executing function f on each component configuration.
Errors will go to the fatal logger fl.
val reverse_eval :
t ->
selector:component_selector ->
f:
((module Dkml_install_api.Component_config) ->
'a Dkml_install_api.Forward_progress.t) ->
fl:Dkml_install_api.Forward_progress.fatal_logger ->
'a list Dkml_install_api.Forward_progress.treverse_eval registry ~f ~fl iterates through the registry in reverse dependency order, executing function f on each component configuration.
Errors will go to the fatal logger fl.