Parameter Make.1-X
type tThe type
tis the type of a first level module you want to load. This is typically the type of your expected config file, as a top level ocaml module.The field
t_repris the concrete OCaml syntax for this module type.The field
univ_constris used to constr and match_ values of type t, embedded in a value of type Univ.t.The field
univ_constr_repris the concrete OCaml syntax for the fielduniv_constr.Example :
module M : A.Sdefined in the library "mylib.cmxa".module My_config_loader = Ocaml_plugin.Dynloader.Make ( struct type t = (module A.S) let t_repr = "Mylib.A.S" let univ_constr = A.univ_constr let univ_constr_repr = "Mylib.A.univ_constr" end)t_repranduniv_constr_reprshould be complete paths, as it would be used by an ocaml file to link with the shared cmi files, in particular be aware that if you have some 'open' statements in your file, you might have different t and t_repr, which is a bad practice.If the module type
A.M_intfis defined in a package, you would need to add it in the t_repr, as it is part of the complete path of the module type ("Mylib" in the example).
val t_repr : stringval univ_constr : t Univ_constr.tval univ_constr_repr : string