Imandrakit_typereg
Type registry.
The registry maps path+type name to a concise description of the type's definition, which can be useful to generate documentation, JSON schema, check version compatibility, etc.
module Ty_expr : sig ... end
Concise type expression
module Ty_def : sig ... end
Concise type definition
val create : unit -> t
val top : t
Toplevel (default) register
declare reg ~__FILE__ tys
declares a clique of types to the registry, with these types being declared in __FILE__
.
val to_iter : t -> Ty_def.clique Iter.t
val find :
t ->
path:string ->
name:string ->
unit ->
(Ty_def.t * Ty_def.clique) option
val find_exn :
t ->
path:string ->
name:string ->
unit ->
Ty_def.t * Ty_def.clique
Same as find
but: