Module Locality.Guts
This module exposes some functions that allow callers to inspect modes directly, which could be useful for error printing and dev tools (such as merlin). Any usage of this in type checking should be pondered.
val check_const :
(Ocaml_typing.Mode.allowed * Ocaml_typing.Mode.allowed)
Ocaml_typing.Mode.Locality.t ->
Ocaml_typing.Mode.Locality.Const.t optionReturns Some c if the given mode has been constrained to constant c. see notes on get_floor in solver_intf.mli for cautions.
val check_const_conservative :
('l * 'r) Ocaml_typing.Mode.Locality.t ->
Ocaml_typing.Mode.Locality.Const.t optionSimilar to check_const but doesn't run the further constraining needed for precise bounds. As a result, it is inexpensive and returns a conservative result. I.e., it might return None for fully-constrained modes.