Primus.Components
A registry of machine components.
We distinguish between two kinds of machine components:
Analyses are specialized components that can have access to the knowledge base and are much easier to write, contrary to generics that are represented as functors.
Generic components are applicable to any instantiation of the Primus monad, while analyses are only applicable to the Primus monad parameterized by the Knowledge Monad. If you are not sure which to use, then use analyses.
When a specialized instance of the Primus monad is run (via Primus.System.run
any specialized component overrides a generic component with the same name).
val register :
?internal:bool ->
?desc:string ->
?package:string ->
string ->
unit Analysis.t ->
unit
register name analysis
registers an analysis under given name.
Fails, if there is already a component with the same name.
val register_generic :
?internal:bool ->
?desc:string ->
?package:string ->
string ->
component ->
unit
register_generic name comp
registers a generic component.
val list : unit -> info list
provides information about registered components.