Module API.Plugin

A plugin of a package pkg must register with register ~name:pkg A plugin can be registered at any time: linked statically, or loaded on demand by Setup.packages.load when the accumulate is met.

A plugin loaded after Setup.init cannot declare state components nor quotations: such a plugin must be loaded before Setup.init.

val register : name:string -> BuiltIn.declaration list -> Setup.builtins
val is_registered : string -> bool
val builtins : string -> Setup.builtins

the builtins of a registered plugin, e.g. to give them to Setup.init; raises an Error.ElpiError if it is not registered

val ensure_registered : load:(pkg:string -> unit) -> string -> unit