package accessor

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

The Subtyping module contains all the types used for accessor subtyping. You shouldn't have to use it, but it's here for the documentation.

The subtyping scheme for accessors involves the following "feature" types. Each kind of accessor is defined by the features it has. If an accessor A's features is a subset of another accessor B's features, then A is a supertype of B.

type constructor = [
  1. | `construct
]
type equality = [
  1. | `get
  2. | `map
  3. | `at_most_one
  4. | `at_least_one
  5. | `construct
  6. | `coerce
]
type field = [
  1. | `get
  2. | `map
  3. | `at_most_one
  4. | `at_least_one
]
type getter = [
  1. | `get
  2. | `at_least_one
  3. | `at_most_one
]
type isomorphism = [
  1. | `get
  2. | `map
  3. | `at_most_one
  4. | `at_least_one
  5. | `construct
]
type many = [
  1. | `get
  2. | `map
]
type many_getter = [
  1. | `get
]
type mapper = [
  1. | `map
]
type nonempty = [
  1. | `get
  2. | `map
  3. | `at_least_one
]
type nonempty_getter = [
  1. | `get
  2. | `at_least_one
]
type optional = [
  1. | `get
  2. | `map
  3. | `at_most_one
]
type optional_getter = [
  1. | `get
  2. | `at_most_one
]
type variant = [
  1. | `get
  2. | `map
  3. | `at_most_one
  4. | `construct
]
OCaml

Innovation. Community. Security.