Module Modes_lib

type monadicity =
  1. | Comonadic
  2. | Monadic
val sexp_of_monadicity : monadicity -> Sexplib0.Sexp.t

Modal axes

type locality =
  1. | Global
  2. | Local
val sexp_of_locality : locality -> Sexplib0.Sexp.t
type portability =
  1. | Portable
  2. | Shareable
  3. | Nonportable
val sexp_of_portability : portability -> Sexplib0.Sexp.t
type contention =
  1. | Uncontended
  2. | Shared
  3. | Contended
val sexp_of_contention : contention -> Sexplib0.Sexp.t
type statefulness =
  1. | Stateless
  2. | Observing
  3. | Stateful
val sexp_of_statefulness : statefulness -> Sexplib0.Sexp.t
type visibility =
  1. | Read_write
  2. | Read
  3. | Immutable
val sexp_of_visibility : visibility -> Sexplib0.Sexp.t
type linearity =
  1. | Many
  2. | Once
val sexp_of_linearity : linearity -> Sexplib0.Sexp.t
type uniqueness =
  1. | Unique
  2. | Aliased
val sexp_of_uniqueness : uniqueness -> Sexplib0.Sexp.t
type yielding =
  1. | Unyielding
  2. | Yielding
val sexp_of_yielding : yielding -> Sexplib0.Sexp.t
type forkable =
  1. | Forkable
  2. | Unforkable
val sexp_of_forkable : forkable -> Sexplib0.Sexp.t
type staticity =
  1. | Static
  2. | Dynamic
val sexp_of_staticity : staticity -> Sexplib0.Sexp.t

Nonmodal jkind axes (soon to be nontrivialities)

type externality =
  1. | External_
  2. | External64
  3. | Internal
val sexp_of_externality : externality -> Sexplib0.Sexp.t
type nullability =
  1. | Non_null
  2. | Maybe_null
val sexp_of_nullability : nullability -> Sexplib0.Sexp.t
type separability =
  1. | Non_float
  2. | Separable
  3. | Maybe_separable
val sexp_of_separability : separability -> Sexplib0.Sexp.t
type !'a axis =
  1. | Locality : locality axis
  2. | Portability : portability axis
  3. | Contention : contention axis
  4. | Statefulness : statefulness axis
  5. | Visibility : visibility axis
  6. | Linearity : linearity axis
  7. | Uniqueness : uniqueness axis
  8. | Yielding : yielding axis
  9. | Forkable : forkable axis
  10. | Staticity : staticity axis
val sexp_of_axis : 'a. 'a axis -> Sexplib0.Sexp.t
type !'a nonmodal_axis =
  1. | Externality : externality nonmodal_axis
  2. | Nullability : nullability nonmodal_axis
  3. | Separability : separability nonmodal_axis
type !'a jkind_axis =
  1. | Modal of 'a axis
  2. | Nonmodal of 'a nonmodal_axis
module type Wrapper = sig ... end
module type Lattice = sig ... end
module type Per_axis = sig ... end
module type Nonmodal_axis = sig ... end
module Base_sort : sig ... end
module Mode : Wrapper
module Modality : Wrapper
module Crossing : Wrapper
module Modal : sig ... end
module Nonmodal : sig ... end
module Jkind_mod : sig ... end
module Layout : sig ... end
module type Axis = sig ... end
module Axis : sig ... end
module Nonmodal_axis : sig ... end
module Jkind_axis : sig ... end

Modal axes

module Locality : Axis with type t = locality
module Portability : Axis with type t = portability
module Contention : Axis with type t = contention
module Statefulness : Axis with type t = statefulness
module Visibility : Axis with type t = visibility
module Linearity : Axis with type t = linearity
module Uniqueness : Axis with type t = uniqueness
module Yielding : Axis with type t = yielding

Nonmodal jkind axes (soon to be nontrivialities)

module Externality : Nonmodal_axis with type t = externality
module Nullability : Nonmodal_axis with type t = nullability
module Optional : sig ... end
module Modes : sig ... end
module Modalities : sig ... end
module Crossings : sig ... end
module Nonmodals : sig ... end
module Jkind_modifiers : sig ... end
module Kind : sig ... end
val apply_modalities : Modalities.t -> Modes.t -> Modes.t
val cross : Crossings.t -> Modes.t -> Modes.t

cross crossing mode strengthens mode as it would on a variable of kind _ mod crossing.

In the compiler, this is known as cross_left.

val uncross : Crossings.t -> Modes.t -> Modes.t

uncross crossing mode is the weakest mode mode' such that cross crossing mode' is at least as strong as mode. It acts as a sort of inverse to cross.

In the compiler, this is known as cross_right.