get_type_arity : string -> int
Returns the arity of a type constructor.
When applied to the name of a type constructor, arity returns its arity, i.e.
how many types it is supposed to be applied to. Base types like :bool are
regarded as constructors with zero arity.
- FAILURE CONDITIONS
Fails if there is no type constructor of that name.
# get_type_arity "bool";;
val it : int = 0
# get_type_arity "fun";;
val it : int = 2
# get_type_arity "nocon";;
Exception: Failure "find".
- SEE ALSO
new_type, new_type_definition, types.