Up

Module type Creators

Signature

type ('a, 'b) t
type 'a key
type ('key, 'data, 'z) create_options
val create : ('a key, 'b, unit -> ('a, 'b) t) create_options
val of_alist : ('a key, 'b, ('a key * 'b) list -> [
| `Ok of ('a, 'b) t
| `Duplicate_key of 'a key
]) create_options
val of_alist_report_all_dups : ('a key, 'b, ('a key * 'b) list -> [
| `Ok of ('a, 'b) t
| `Duplicate_keys of 'a key list
]) create_options
val of_alist_or_error : ('a key, 'b, ('a key * 'b) list -> ('a, 'b) t Core_kernel.Or_error.t) create_options
val of_alist_exn : ('a key, 'b, ('a key * 'b) list -> ('a, 'b) t) create_options
val of_alist_multi : ('a key, 'b list, ('a key * 'b) list -> ('a, 'b list) t) create_options
val create_mapped : ('a key, 'b, get_key:('r -> 'a key) -> get_data:('r -> 'b) -> 'r list -> [
| `Ok of ('a, 'b) t
| `Duplicate_keys of 'a key list
]) create_options
 create_mapped get_key get_data [x1,...,xn]
         = of_alist [get_key x1, get_data x1; ...; get_key xn, get_data xn]
     
val create_with_key : ('a key, 'r, get_key:('r -> 'a key) -> 'r list -> [
| `Ok of ('a, 'r) t
| `Duplicate_keys of 'a key list
]) create_options
 create_with_key ~get_key [x1,...,xn]
         = of_alist [get_key x1, x1; ...; get_key xn, xn] 
val create_with_key_or_error : ('a key, 'r, get_key:('r -> 'a key) -> 'r list -> ('a, 'r) t Core_kernel.Or_error.t) create_options
val create_with_key_exn : ('a key, 'r, get_key:('r -> 'a key) -> 'r list -> ('a, 'r) t) create_options
val group : ('a key, 'b, get_key:('r -> 'a key) -> get_data:('r -> 'b) -> combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t) create_options