Functor Kind.Make


module Make: 
functor (T : sig
type t 
Type used to build the first-class-value type.
val dummy : t
A dummy value.
val name : string
Name of the kind to generate (debugging purpose only).
val kind_name : t -> string
Name of a value of type t.
end) -> sig .. end
Kind generator.
Parameters:
T : sig type t (** Type used to build the first-class-value type. *) val dummy: t (** A dummy value. *) val name: string (** Name of the kind to generate (debugging purpose only). *) val kind_name: t -> string (** Name of a value of type [t]. *) end

type t 
Type of kinds (roughly speaking, a second-order type) which the values have type T.t .
val dummy : t
A dummy kind.
val equal : t -> t -> bool
Since Boron-20100401
val compare : t -> t -> int
Since Boron-20100401
val hash : t -> int
Since Boron-20100401
module Selection: Kind.SELECTION  with type kind = t
Selection for this type of kinds.
val create : T.t -> t list -> t
Create a new kind from a value with some dependencies. create is a bijection. If ocaml assertions are checked, some verifications about the well-foundness of the dependency graph extended with this kind are performed (using the name of the kind, given by T.kind_name).
val value : t -> T.t
Inverse of create.
val get_from_name : string -> t
Reverse of name (as names are uniques for kinds, this function is the injection from kinds to names).
Since Boron-20100401
Raises Not_found if there is no kind with this name.
exception DependencyAlreadyExists of string * string
May be raised by add_dependency.
val add_dependency : t -> t -> unit
add_dependency k1 k2 indicates that the kind k1 depends on the kind k2, that is an action of the kind k2 must be done before one of the kind k1.
Raises DependencyAlreadyExists if such a dependency already exists.
val iter : (T.t -> 'a -> unit) -> 'a -> unit
iter f x applies f k x for each kind k of type t. Order of applications is not specified.
val apply_in_order : Selection.t ->
Selection.t -> (t -> 'a -> 'a) -> 'a -> 'a
apply_in_order only except f x folds f for of each kind of type t (or for each kind specified by only and except if one of them is non-empty), begining to acc and following a topological order of kinds dependencies.
val iter_in_order : Selection.t ->
Selection.t -> (T.t -> 'a -> unit) -> 'a -> unit
iter_in_order only except f x applies f v x for each kind value v of type T.t (or for each kind specified by only and except if one of them is non-empty), following the same order as apply_in_order.
val full_iter_in_order : Selection.t ->
Selection.t -> (T.t -> 'a -> unit) -> 'a -> unit
full_iter_in_order has the same behavior than iter_in_order but takes into account the dynamic dependencies.
Since Boron-20100401
val fold_in_order : Selection.t ->
Selection.t -> (T.t -> 'a -> 'a) -> 'a -> 'a
fold_in_order only except f acc folds f v x for each kind value v of type T.t (or for each kind specified by only and except if one of them is non-empty), begining to acc and following the same order as apply_in_order.
val number_of_applicants : Selection.t -> Selection.t -> int option
number_of_applicants only except computes how many states would be impacted by a folding. Return None if all states are impacted.
val full_number_of_applicants : Selection.t -> Selection.t -> int option
full_number_of_applicants only except computes how many states would be impacted by a full folding. Return None if all states are impacted.
Since Boron-20100401
module Dynamic: sig .. end
Dynamic kinds.

Debugging Tools


val dump_dependencies : ?only:Selection.t ->
?except:Selection.t -> string -> unit
Dump the dependencies of kinds of type t (or those of kinds specified by only and except if any) in a file (in dot format).
val dump_dynamic_dependencies : ?only:Selection.t ->
?except:Selection.t -> string -> unit
Dump the dependencies of kinds of type t (or those of kinds specified by only and except if any) in a file (in dot format).