jon.recoil.org

Module Ocaml_typing.ModeSource

include Mode_intf.S
Sourcemodule Lattices : sig ... end
Sourceval erase_hints : unit -> unit

Remove hints from all variables that have been created. See the comments on erase_hint in Solver_intf for details.

module Hint = Mode_hint
Sourceval print_pinpoint : Hint.pinpoint -> (definite:bool -> capitalize:bool -> Ocaml_typing.Mode_intf.Fmt.formatter -> unit) option

Prints a pinpoint. Say "a foo" if definite is false, say "the foo" otherwise. Defaults to the latter.

Sourcetype nonrec 'a simple_error = 'a Mode_intf.simple_error
Sourcetype changes
Sourceval undo_changes : changes -> unit
Sourceval set_append_changes : (changes ref -> unit) -> unit
Sourcetype nonrec allowed = Allowance.allowed
Sourcetype nonrec disallowed = Allowance.disallowed
Sourcetype nonrec equate_step = Mode_intf.equate_step
Sourcetype ('a, 'd) mode constraint 'd = 'l * 'r
Sourcetype ('a, 'b) monadic_comonadic = {
  1. monadic : 'a;
  2. comonadic : 'b;
}
Sourcemodule type Common_axis_pos = sig ... end
Sourcemodule type Common_axis_neg = sig ... end
Sourcemodule Locality : sig ... end
Sourcemodule Regionality : sig ... end
Sourcemodule Linearity : sig ... end
Sourcemodule Portability : sig ... end
Sourcemodule Uniqueness : sig ... end
Sourcemodule Contention : sig ... end
Sourcemodule Forkable : sig ... end
Sourcemodule Yielding : sig ... end
Sourcemodule Statefulness : sig ... end
Sourcemodule Visibility : sig ... end
Sourcemodule Staticity : sig ... end
Sourcetype 'a comonadic_with = {
  1. areality : 'a;
  2. linearity : Linearity.Const.t;
  3. portability : Portability.Const.t;
  4. forkable : Forkable.Const.t;
  5. yielding : Yielding.Const.t;
  6. statefulness : Statefulness.Const.t;
}
Sourcetype monadic = {
  1. uniqueness : Uniqueness.Const.t;
  2. contention : Contention.Const.t;
  3. visibility : Visibility.Const.t;
  4. staticity : Staticity.Const.t;
}
Sourcemodule Axis : sig ... end
Sourcemodule Value : sig ... end

The most general mode. Used in most type checking, including in value bindings in Env

Sourcemodule Alloc : sig ... end

The mode on arrow types. Compared to Value, it contains the Locality axis instead of Regionality axis, as arrow types are exposed to users and would be hard to understand if it involves Regionality.

Sourcemodule Const : sig ... end
Sourceval regional_to_local : ('l * 'r) Regionality.t -> ('l * 'r) Locality.t

Converts regional to local, identity otherwise

Sourceval locality_as_regionality : ('l * 'r) Locality.t -> ('l * 'r) Regionality.t

Inject locality into regionality

Sourceval regional_to_global : ('l * 'r) Regionality.t -> ('l * 'r) Locality.t

Converts regional to global, identity otherwise

Sourceval alloc_as_value : ('l * 'r) Alloc.t -> ('l * 'r) Value.t

Similar to locality_as_regionality, behaves as identity on other axes

Sourceval alloc_to_value_l2r : ('l * 'r) Alloc.t -> ('l * disallowed) Value.t

Similar to local_to_regional, behaves as identity in other axes

Sourceval value_to_alloc_r2l : ('l * 'r) Value.t -> ('l * 'r) Alloc.t

Similar to regional_to_local, behaves as identity on other axes

Sourceval value_to_alloc_r2g : ('l * 'r) Value.t -> ('l * 'r) Alloc.t

Similar to regional_to_global, behaves as identity on other axes

Sourceval value_r2g : ?hint:('l * 'r) Hint.morph -> ('l * 'r) Value.t -> ('l * 'r) Value.t

Similar to value_to_alloc_r2g, but followed by alloc_as_value.

Sourcemodule Modality : sig ... end
Sourcemodule Crossing : sig ... end

Some modes on an axis might be indistinguishable for values of some type, in which case the actual mode of values can be strenghthened (or equivalently the expected mode loosened) accordingly to make more programs mode-check. The capabilities/permissions to perform such adjustments are called mode crossing and depicted in this module.