These kinds do not directly correspond to the kind of their referent (e.g. a type path may refer to a class definition).
type path = [
| `Module
| `ModuleType
| `Type
| `Class
| `ClassType
]
type path_module = [
| `Module
]
type path_module_type = [
| `ModuleType
]
type path_type = [
| `Type
| `Class
| `ClassType
]
type path_class_type = [
| `Class
| `ClassType
]
Fragment kinds
There are two kinds of OCaml path fragment:
module
type
These kinds do not directly correspond to the kind of their referent (e.g. a type path fragment may refer to a class definition).
type fragment = [
| `Module
| `Type
| `Class
| `ClassType
]
type fragment_module = [
| `Module
]
type fragment_type = [
| `Type
| `Class
| `ClassType
]
Reference kinds
There is one reference kind for each kind of referent. However, the kind of a reference does not refer to the kind of its referent, but to the kind with which the reference was annotated.
This means that reference kinds do not correspond directly to the kind of their referent because we used more relaxed rules when resolving a reference. For example, a reference annotated as being to a constructor can be resolved to the definition of an exception (which is a sort of constructor).