module Consumer: Generic_core_consumertype 'b ty_fun = {
|
f : |
type 'b closure = {
|
f : |
(* | f: applies the extensible function.Raises Generic_core_extensible.Type_pattern_match_failure when the type index doesn't
match any of the patterns in the collection. | *) |
|
ext : |
(* | ext: extends the function with a new case. We must
provide a type pattern, (example: List Any). The
ty_fun provided is only expected to handle types
matching with the pattern. Effectful.Raises Generic_core_extensible.Pattern_overwrite when called with a type pattern that
was already registered. | *) |
val create : string -> 'a closurecreate name, creates a new closure initially empty:
calling f will raise
Type_pattern_match_failure. The name is used in the exception messages. Effectful.