package doc-ock

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Every path is annotated with its kind.

General purpose kinds
type any = [
  1. | `Module
  2. | `ModuleType
  3. | `Type
  4. | `Constructor
  5. | `Field
  6. | `Extension
  7. | `Exception
  8. | `Value
  9. | `Class
  10. | `ClassType
  11. | `Method
  12. | `InstanceVariable
  13. | `Label
  14. | `Page
]

Any possible referent

type signature = [
  1. | `Module
  2. | `ModuleType
]

A referent that can contain signature items

type class_signature = [
  1. | `Class
  2. | `ClassType
]

A referent that can contain class signature items

type datatype = [
  1. | `Type
]

A referent that can contain datatype items

type page = [
  1. | `Page
]

A referent that can contain page items

type parent = [
  1. | signature
  2. | class_signature
  3. | datatype
]

A referent that can contain other items

type label_parent = [
  1. | parent
  2. | page
]
Identifier kinds

The kind of an identifier directly corresponds to the kind of its referent.

type identifier = any
type identifier_module = [
  1. | `Module
]
type identifier_module_type = [
  1. | `ModuleType
]
type identifier_type = [
  1. | `Type
]
type identifier_constructor = [
  1. | `Constructor
]
type identifier_field = [
  1. | `Field
]
type identifier_extension = [
  1. | `Extension
]
type identifier_exception = [
  1. | `Exception
]
type identifier_value = [
  1. | `Value
]
type identifier_class = [
  1. | `Class
]
type identifier_class_type = [
  1. | `ClassType
]
type identifier_method = [
  1. | `Method
]
type identifier_instance_variable = [
  1. | `InstanceVariable
]
type identifier_label = [
  1. | `Label
]
type identifier_page = [
  1. | `Page
]
Path kinds

There are four kinds of OCaml path:

  • module
  • module type
  • type
  • class type

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 = [
  1. | `Module
  2. | `ModuleType
  3. | `Type
  4. | `Class
  5. | `ClassType
]
type path_module = [
  1. | `Module
]
type path_module_type = [
  1. | `ModuleType
]
type path_type = [
  1. | `Type
  2. | `Class
  3. | `ClassType
]
type path_class_type = [
  1. | `Class
  2. | `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 = [
  1. | `Module
  2. | `Type
  3. | `Class
  4. | `ClassType
]
type fragment_module = [
  1. | `Module
]
type fragment_type = [
  1. | `Type
  2. | `Class
  3. | `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).

type reference = any
type reference_module = [
  1. | `Module
]
type reference_module_type = [
  1. | `ModuleType
]
type reference_type = [
  1. | `Type
  2. | `Class
  3. | `ClassType
]
type reference_constructor = [
  1. | `Constructor
  2. | `Extension
  3. | `Exception
]
type reference_field = [
  1. | `Field
]
type reference_extension = [
  1. | `Extension
  2. | `Exception
]
type reference_exception = [
  1. | `Exception
]
type reference_value = [
  1. | `Value
]
type reference_class = [
  1. | `Class
]
type reference_class_type = [
  1. | `Class
  2. | `ClassType
]
type reference_method = [
  1. | `Method
]
type reference_instance_variable = [
  1. | `InstanceVariable
]
type reference_label = [
  1. | `Label
]
type reference_page = [
  1. | `Page
]