module String_tbl:functor (Info:sigtype'atend) ->Heterogeneous_tablewith type key = string and type 'a info = 'a Info.t
Heterogeneous tables indexed by string.
| Parameters: |
|
type key
type 'a info
type t
Type of heterogeneous (hash)tables indexed by values of type Key.t. Type values ensure type safety.
val create : int -> tcreate n creates a new table of initial size n.
val add : t ->
key ->
'a Type.ty -> 'a info -> unitadd tbl s ty v binds s to the value v in the table tbl.
If the returned value is a closure whose the type of one of its
argument was dynamically registered, then it may raise
Incompatible_Type.
AlreadyExists if s is already bound in tbl.unit now.exception Unbound_value of string
exception Incompatible_type of string
val find : t ->
key ->
'a Type.ty -> 'a infofind tbl s ty returns the binding of s in the table tbl.
Unbound_value if s is not bound in tbl.Incompatible_Type if ty was not the type value used to add
the binding of s in tbl.val iter : (key ->
'a Type.ty -> 'a info -> unit) ->
t -> unitval fold : (key ->
'a Type.ty -> 'a info -> 'b -> 'b) ->
t -> 'b -> 'b