Module Ocaml_typing.Env
type value_unbound_reason = | Val_unbound_instance_variable| Val_unbound_self| Val_unbound_ancestor| Val_unbound_ghost_recursive of Ocaml_parsing.Location.t
type summary = | Env_empty| Env_value of Ocaml_typing.Env.summary * Ocaml_typing.Ident.t * Ocaml_typing.Types.value_description * Ocaml_typing.Mode.Value.l| Env_type of Ocaml_typing.Env.summary * Ocaml_typing.Ident.t * Ocaml_typing.Types.type_declaration| Env_extension of Ocaml_typing.Env.summary * Ocaml_typing.Ident.t * Ocaml_typing.Types.extension_constructor| Env_module of Ocaml_typing.Env.summary * Ocaml_typing.Ident.t * Ocaml_typing.Types.module_presence * Ocaml_typing.Types.module_declaration * Ocaml_typing.Mode.Value.l * Ocaml_typing.Env.locks| Env_modtype of Ocaml_typing.Env.summary * Ocaml_typing.Ident.t * Ocaml_typing.Types.modtype_declaration| Env_class of Ocaml_typing.Env.summary * Ocaml_typing.Ident.t * Ocaml_typing.Types.class_declaration| Env_cltype of Ocaml_typing.Env.summary * Ocaml_typing.Ident.t * Ocaml_typing.Types.class_type_declaration| Env_open of Ocaml_typing.Env.summary * Ocaml_typing.Path.t(*The string set argument of
*)Env_openrepresents a list of module names to skip, i.e. that won't be imported in the toplevel namespace.| Env_functor_arg of Ocaml_typing.Env.summary * Ocaml_typing.Ident.t| Env_constraints of Ocaml_typing.Env.summary * Ocaml_typing.Types.type_declaration Ocaml_typing.Path.Map.t| Env_copy_types of Ocaml_typing.Env.summary| Env_persistent of Ocaml_typing.Env.summary * Ocaml_typing.Ident.t| Env_value_unbound of Ocaml_typing.Env.summary * string * Ocaml_typing.Env.value_unbound_reason| Env_module_unbound of Ocaml_typing.Env.summary * string * Ocaml_typing.Env.module_unbound_reason
type address = Ocaml_typing.Persistent_env.address = | Aunit of Ocaml_typing.Compilation_unit.t| Alocal of Ocaml_typing.Ident.t| Adot of Ocaml_typing.Env.address * Ocaml_typing.Jkind.Sort.t array * int
val empty : Ocaml_typing.Env.tval initial : Ocaml_typing.Env.t Stdlib.Lazy.tval diff :
Ocaml_typing.Env.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t listval same_type_declarations : Ocaml_typing.Env.t -> Ocaml_typing.Env.t -> booltype type_descriptions = Ocaml_typing.Env.type_descr_kindval iter_types :
(Ocaml_typing.Path.t ->
(Ocaml_typing.Path.t * Ocaml_typing.Types.type_declaration) ->
unit) ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.iter_contval run_iter_cont :
Ocaml_typing.Env.iter_cont list ->
(Ocaml_typing.Path.t * Ocaml_typing.Env.iter_cont) listval same_types : Ocaml_typing.Env.t -> Ocaml_typing.Env.t -> boolval used_persistent : unit -> Ocaml_typing.Compilation_unit.Name.Set.tval find_shadowed_types :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t listval find_value_no_locks_exn :
Ocaml_typing.Ident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Subst.Lazy.value_description * Ocaml_typing.Mode.Value.lFind a value by an Ident.t. Raises if encounters any locks.
val find_value :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Subst.Lazy.value_descriptionval find_type :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_declarationval find_type_descrs :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.type_descriptionsval find_module_lazy :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Subst.Lazy.module_declarationval find_module :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.module_declarationval find_modtype_lazy :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Subst.Lazy.modtype_declarationval find_modtype :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.modtype_declarationval find_class :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.class_declarationval find_cltype :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.class_type_declarationval find_ident_constructor :
Ocaml_typing.Ident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.constructor_descriptionval find_ident_label :
'rcd Ocaml_typing.Types.record_form ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Env.t ->
'rcd Ocaml_typing.Types.gen_label_descriptionval find_type_expansion :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr list * Ocaml_typing.Types.type_expr * intval find_type_expansion_opt :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr list * Ocaml_typing.Types.type_expr * intval find_modtype_expansion :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.module_typeval find_modtype_expansion_lazy :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Subst.Lazy.module_typeval find_hash_type :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_declarationval find_value_address :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.addressval find_module_address :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.addressval find_class_address :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.addressval find_constructor_address :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.addressval shape_of_path :
namespace:Ocaml_typing.Shape.Sig_component_kind.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t ->
Ocaml_typing.Shape.tval shape_of_path_opt :
namespace:Ocaml_typing.Shape.Sig_component_kind.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t ->
Ocaml_typing.Shape.t optionval shape_for_constr :
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t ->
args:Ocaml_typing.Shape.t list ->
Ocaml_typing.Shape.t optionval add_functor_arg :
Ocaml_typing.Ident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval is_functor_arg : Ocaml_typing.Path.t -> Ocaml_typing.Env.t -> boolval normalize_module_path :
Ocaml_parsing.Location.t option ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t ->
Ocaml_typing.Path.tval normalize_type_path :
Ocaml_parsing.Location.t option ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t ->
Ocaml_typing.Path.tval normalize_value_path :
Ocaml_parsing.Location.t option ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t ->
Ocaml_typing.Path.tval normalize_modtype_path :
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t ->
Ocaml_typing.Path.tval normalize_instance_names_in_module_path :
Ocaml_typing.Path.t ->
Ocaml_typing.Path.tval get_required_globals : unit -> Ocaml_typing.Compilation_unit.t listval add_required_global : Ocaml_typing.Path.t -> Ocaml_typing.Env.t -> unitval has_local_constraints : Ocaml_typing.Env.t -> boolval mark_value_used : Ocaml_typing.Types.Uid.t -> unitval mark_module_used : Ocaml_typing.Types.Uid.t -> unitval mark_type_used : Ocaml_typing.Types.Uid.t -> unitval mark_value_mutated : Ocaml_typing.Types.Uid.t -> unitval mark_constructor_used :
Ocaml_typing.Env.constructor_usage ->
Ocaml_typing.Types.Uid.t ->
unitval mark_extension_used :
Ocaml_typing.Env.constructor_usage ->
Ocaml_typing.Types.Uid.t ->
unitval mark_label_used :
Ocaml_typing.Env.label_usage ->
Ocaml_typing.Types.Uid.t ->
unittype mode_with_locks = Ocaml_typing.Mode.Value.l * Ocaml_typing.Env.locksSometimes we get the locks for something, but either want to walk them later, or walk them for something else. The Longident.t and Location.t are only for error messages, and point to the variable for which we actually want to walk the locks.
val locks_empty : Ocaml_typing.Env.locksval locks_is_empty : Ocaml_typing.Env.locks -> boolval mode_unit : Ocaml_typing.Mode.Value.lrtype lookup_error = | Unbound_value of Ocaml_parsing.Longident.t * Ocaml_typing.Env.unbound_value_hint| Unbound_type of Ocaml_parsing.Longident.t| Unbound_constructor of Ocaml_parsing.Longident.t| Unbound_label of Ocaml_parsing.Longident.t * Ocaml_typing.Types.record_form_packed * Ocaml_typing.Env.label_usage| Unbound_module of Ocaml_parsing.Longident.t| Unbound_class of Ocaml_parsing.Longident.t| Unbound_modtype of Ocaml_parsing.Longident.t| Unbound_cltype of Ocaml_parsing.Longident.t| Unbound_settable_variable of string| Not_a_settable_variable of string| Masked_instance_variable of Ocaml_parsing.Longident.t| Masked_self_variable of Ocaml_parsing.Longident.t| Masked_ancestor_variable of Ocaml_parsing.Longident.t| Structure_used_as_functor of Ocaml_parsing.Longident.t| Abstract_used_as_functor of Ocaml_parsing.Longident.t * Ocaml_typing.Path.t| Functor_used_as_structure of Ocaml_parsing.Longident.t * Ocaml_typing.Env.structure_components_reason| Abstract_used_as_structure of Ocaml_parsing.Longident.t * Ocaml_typing.Path.t * Ocaml_typing.Env.structure_components_reason| Generative_used_as_applicative of Ocaml_parsing.Longident.t| Illegal_reference_to_recursive_module of {}| Illegal_reference_to_recursive_class_type of {container : string option;unbound : string;unbound_class_type : Ocaml_parsing.Longident.t;container_class_type : string;
}| Cannot_scrape_alias of Ocaml_parsing.Longident.t * Ocaml_typing.Path.t| Local_value_used_in_exclave of Ocaml_typing.Mode.Hint.lock_item * Ocaml_parsing.Longident.t| Non_value_used_in_object of Ocaml_parsing.Longident.t * Ocaml_typing.Types.type_expr * Ocaml_typing.Jkind.Violation.t| No_unboxed_version of Ocaml_parsing.Longident.t * Ocaml_typing.Types.type_declaration| Error_from_persistent_env of Ocaml_typing.Persistent_env.error| Mutable_value_used_in_closure of Ocaml_typing.Mode.Hint.pinpoint| Incompatible_stage of Ocaml_parsing.Longident.t * Ocaml_parsing.Location.t * Ocaml_typing.Env.stage * Ocaml_parsing.Location.t * Ocaml_typing.Env.stage| No_constructor_in_stage of Ocaml_parsing.Longident.t * Ocaml_parsing.Location.t * int
val lookup_error :
Ocaml_parsing.Location.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.lookup_error ->
'aval walk_locks :
env:Ocaml_typing.Env.t ->
loc:Ocaml_parsing.Location.t ->
Ocaml_parsing.Longident.t ->
item:Ocaml_typing.Mode.Hint.lock_item ->
Ocaml_typing.Types.type_expr option ->
Ocaml_typing.Env.mode_with_locks ->
Ocaml_typing.Mode.Value.lTakes the mode and the type of a value at definition site, walks through the list of locks and constrains the mode and the type. Return the access mode of the value allowed by the locks. ty is optional as the function works on modules and classes as well, for which ty should be None.
val lookup_value :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t
* Ocaml_typing.Types.value_description
* Ocaml_typing.Env.mode_with_locksval lookup_type :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Types.type_declarationval lookup_module :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t
* Ocaml_typing.Types.module_declaration
* Ocaml_typing.Env.mode_with_locksval lookup_modtype :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Types.modtype_declarationval lookup_class :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t
* Ocaml_typing.Types.class_declaration
* Ocaml_typing.Mode.Value.lval lookup_cltype :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Types.class_type_declarationval lookup_module_path :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
load:bool ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Env.mode_with_locksval lookup_modtype_path :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.tval lookup_module_instance_path :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
load:bool ->
Ocaml_typing.Global_module.Name.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Env.locksval lookup_constructor :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.constructor_usage ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.constructor_description * Ocaml_typing.Env.locksval lookup_all_constructors :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.constructor_usage ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
(((Ocaml_typing.Types.constructor_description * Ocaml_typing.Env.locks)
* (unit ->
unit))
list,
Ocaml_parsing.Location.t
* Ocaml_typing.Env.t
* Ocaml_typing.Env.lookup_error)
Stdlib.resultval lookup_all_constructors_from_type :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.constructor_usage ->
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
((Ocaml_typing.Types.constructor_description * Ocaml_typing.Env.locks)
* (unit ->
unit))
listval lookup_label :
?use:bool ->
record_form:'rcd Ocaml_typing.Types.record_form ->
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.label_usage ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
'rcd Ocaml_typing.Types.gen_label_descriptionval lookup_all_labels :
?use:bool ->
record_form:'rcd Ocaml_typing.Types.record_form ->
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.label_usage ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
(('rcd Ocaml_typing.Types.gen_label_description * (unit -> unit)) list,
Ocaml_parsing.Location.t
* Ocaml_typing.Env.t
* Ocaml_typing.Env.lookup_error)
Stdlib.resultval lookup_all_labels_from_type :
?use:bool ->
record_form:'rcd Ocaml_typing.Types.record_form ->
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.label_usage ->
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
('rcd Ocaml_typing.Types.gen_label_description * (unit -> unit)) listtype settable_variable = | Instance_variable of Ocaml_typing.Path.t * Ocaml_parsing.Asttypes.mutable_flag * string * Ocaml_typing.Types.type_expr| Mutable_variable of Ocaml_typing.Ident.t * Ocaml_typing.Mode.Value.r * Ocaml_typing.Types.type_expr * Ocaml_typing.Jkind.Sort.t
val lookup_settable_variable :
?use:bool ->
loc:Ocaml_parsing.Location.t ->
string ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.settable_variableFor a mutable variable, use means mark as mutated. For an instance variable, it means mark as used.
val find_value_by_name :
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Types.value_descriptionval find_value_by_name_lazy :
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Subst.Lazy.value_descriptionval find_type_by_name :
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Types.type_declarationval find_module_by_name_lazy :
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Subst.Lazy.module_declarationval find_modtype_by_name_lazy :
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Subst.Lazy.modtype_declarationval find_class_by_name :
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Types.class_declarationval find_cltype_by_name :
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Types.class_type_declarationval find_constructor_by_name :
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.constructor_descriptionval find_label_by_name :
'rep Ocaml_typing.Types.record_form ->
Ocaml_parsing.Longident.t ->
Ocaml_typing.Env.t ->
'rep Ocaml_typing.Types.gen_label_descriptionval find_value_index : Ocaml_typing.Ident.t -> Ocaml_typing.Env.t -> int optionThe find_*_index functions computes a "namespaced" De Bruijn index of an identifier in a given environment. In other words, it returns how many times an identifier has been shadowed by a more recent identifiers with the same name in a given environment. Those functions return None when the identifier is not bound in the environment. This behavior is there to facilitate the detection of inconsistent printing environment, but should disappear in the long term.
val find_type_index : Ocaml_typing.Ident.t -> Ocaml_typing.Env.t -> int optionval find_module_index :
Ocaml_typing.Ident.t ->
Ocaml_typing.Env.t ->
int optionval find_modtype_index :
Ocaml_typing.Ident.t ->
Ocaml_typing.Env.t ->
int optionval find_class_index : Ocaml_typing.Ident.t -> Ocaml_typing.Env.t -> int optionval find_cltype_index :
Ocaml_typing.Ident.t ->
Ocaml_typing.Env.t ->
int optionval bound_value : string -> Ocaml_typing.Env.t -> boolval bound_module : string -> Ocaml_typing.Env.t -> boolval bound_type : string -> Ocaml_typing.Env.t -> boolval bound_modtype : string -> Ocaml_typing.Env.t -> boolval bound_class : string -> Ocaml_typing.Env.t -> boolval bound_cltype : string -> Ocaml_typing.Env.t -> boolval make_copy_of_types :
Ocaml_typing.Env.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval global_of_instance_compilation_unit :
Ocaml_typing.Compilation_unit.t ->
Ocaml_typing.Global_module.tval add_value_lazy :
?check:(string -> Ocaml_utils.Warnings.t) ->
mode:(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Value.t ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Subst.Lazy.value_description ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_value :
?check:(string -> Ocaml_utils.Warnings.t) ->
mode:(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Value.t ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.value_description ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_type :
check:bool ->
?shape:Ocaml_typing.Shape.t ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_type_long_path :
check:bool ->
?shape:Ocaml_typing.Shape.t ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_extension :
check:bool ->
?shape:Ocaml_typing.Shape.t ->
rebind:bool ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.extension_constructor ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_module :
?arg:bool ->
?shape:Ocaml_typing.Shape.t ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.module_presence ->
Ocaml_typing.Types.module_type ->
?mode:Ocaml_typing.Mode.Value.l ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_module_lazy :
update_summary:bool ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.module_presence ->
Ocaml_typing.Subst.Lazy.module_type ->
?mode:Ocaml_typing.Mode.Value.l ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_module_declaration :
?arg:bool ->
?shape:Ocaml_typing.Shape.t ->
check:bool ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.module_presence ->
Ocaml_typing.Types.module_declaration ->
?mode:(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Value.t ->
?locks:Ocaml_typing.Env.locks ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_module_declaration_lazy :
?arg:bool ->
update_summary:bool ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.module_presence ->
Ocaml_typing.Subst.Lazy.module_declaration ->
?mode:(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Value.t ->
?locks:Ocaml_typing.Env.locks ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_modtype :
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.modtype_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_modtype_lazy :
update_summary:bool ->
Ocaml_typing.Ident.t ->
Ocaml_typing.Subst.Lazy.modtype_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_class :
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.class_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_cltype :
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.class_type_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_local_constraint :
Ocaml_typing.Path.t ->
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_persistent_structure :
Ocaml_typing.Ident.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval persistent_structures_of_dir :
Ocaml_utils.Load_path.Dir.t ->
Merlin_utils.Misc.String.Set.tval persistent_structures_of_basenames :
string list ->
Merlin_utils.Misc.String.Set.tval filter_non_loaded_persistent :
(Ocaml_typing.Ident.t -> bool) ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_signature :
Ocaml_typing.Types.signature ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_signature_lazy :
Ocaml_typing.Subst.Lazy.signature_item list ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval open_signature :
used_slot:bool Stdlib.ref ->
loc:Ocaml_parsing.Location.t ->
toplevel:bool ->
Ocaml_parsing.Asttypes.override_flag ->
Ocaml_parsing.Longident.t Ocaml_parsing.Location.loc ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Env.mode_with_locks * Ocaml_typing.Env.tval open_signature_by_path :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval open_pers_signature :
string ->
Ocaml_typing.Env.t ->
Ocaml_typing.Path.t * Ocaml_typing.Env.mode_with_locks * Ocaml_typing.Env.tval remove_last_open :
Ocaml_typing.Path.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.t optionval enter_value :
?check:(string -> Ocaml_utils.Warnings.t) ->
mode:(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Value.t ->
string ->
Ocaml_typing.Types.value_description ->
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t * Ocaml_typing.Env.tval enter_type :
scope:int ->
string ->
Ocaml_typing.Types.type_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t * Ocaml_typing.Env.tval enter_extension :
scope:int ->
rebind:bool ->
string ->
Ocaml_typing.Types.extension_constructor ->
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t * Ocaml_typing.Env.tval enter_module :
scope:int ->
?arg:bool ->
string ->
Ocaml_typing.Types.module_presence ->
Ocaml_typing.Types.module_type ->
?mode:(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Value.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t * Ocaml_typing.Env.tval enter_module_declaration :
scope:int ->
?arg:bool ->
?shape:Ocaml_typing.Shape.t ->
string ->
Ocaml_typing.Types.module_presence ->
Ocaml_typing.Types.module_declaration ->
?mode:(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Value.t ->
?locks:Ocaml_typing.Env.locks ->
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t * Ocaml_typing.Env.tval enter_modtype :
scope:int ->
string ->
Ocaml_typing.Types.modtype_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t * Ocaml_typing.Env.tval enter_class :
scope:int ->
string ->
Ocaml_typing.Types.class_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t * Ocaml_typing.Env.tval enter_cltype :
scope:int ->
string ->
Ocaml_typing.Types.class_type_declaration ->
Ocaml_typing.Env.t ->
Ocaml_typing.Ident.t * Ocaml_typing.Env.tval enter_signature :
?mod_shape:Ocaml_typing.Shape.t ->
scope:int ->
Ocaml_typing.Types.signature ->
?mode:(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Value.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.signature * Ocaml_typing.Env.tval enter_signature_and_shape :
scope:int ->
parent_shape:Ocaml_typing.Shape.Map.t ->
Ocaml_typing.Shape.t ->
Ocaml_typing.Types.signature ->
?mode:(Ocaml_typing.Mode.allowed * 'r) Ocaml_typing.Mode.Value.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Types.signature * Ocaml_typing.Shape.Map.t * Ocaml_typing.Env.tval enter_unbound_value :
string ->
Ocaml_typing.Env.value_unbound_reason ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval enter_unbound_module :
string ->
Ocaml_typing.Env.module_unbound_reason ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_closure_lock :
Ocaml_typing.Mode.Hint.pinpoint ->
('l * Ocaml_typing.Mode.allowed) Ocaml_typing.Mode.Value.Comonadic.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval add_const_closure_lock :
?ghost:bool ->
Ocaml_typing.Mode.Hint.pinpoint ->
Ocaml_typing.Mode.Value.Comonadic.Const.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tA variant of add_closure_lock where the mode of the closure is a constant due to the nature of the pinpoint. As a result, the mode is not printed in error messages. ghost = true means the closure is not a value (such as a loop)
val add_region_lock : Ocaml_typing.Env.t -> Ocaml_typing.Env.tval add_exclave_lock : Ocaml_typing.Env.t -> Ocaml_typing.Env.tval add_unboxed_lock : Ocaml_typing.Env.t -> Ocaml_typing.Env.tval enter_quotation : Ocaml_typing.Env.t -> Ocaml_typing.Env.tval enter_splice :
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval check_no_open_quotations :
Ocaml_parsing.Location.t ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.no_open_quotations_context ->
unitval stage : Ocaml_typing.Env.t -> Ocaml_typing.Env.stageval set_unit_name : Ocaml_typing.Unit_info.t option -> unitval get_unit_name : unit -> Ocaml_typing.Unit_info.t optionval read_signature :
Ocaml_typing.Global_module.Name.t ->
Ocaml_typing.Unit_info.Artifact.t ->
Ocaml_typing.Types.signatureval save_signature :
alerts:Merlin_utils.Misc.alerts ->
Ocaml_typing.Types.signature ->
Ocaml_typing.Compilation_unit.Name.t ->
Ocaml_typing.Cmi_format.kind ->
Ocaml_typing.Unit_info.Artifact.t ->
Ocaml_typing.Cmi_format.cmi_infos_lazyval save_signature_with_imports :
alerts:Merlin_utils.Misc.alerts ->
Ocaml_typing.Types.signature ->
Ocaml_typing.Compilation_unit.Name.t ->
Ocaml_typing.Cmi_format.kind ->
Ocaml_typing.Unit_info.Artifact.t ->
Ocaml_typing.Import_info.t array ->
Ocaml_typing.Cmi_format.cmi_infos_lazyval register_parameter : Ocaml_typing.Global_module.Parameter_name.t -> unitval crc_of_unit : Ocaml_typing.Compilation_unit.Name.t -> Stdlib.Digest.tval imports : unit -> Ocaml_typing.Import_info.t listval import_crcs : source:string -> Ocaml_typing.Import_info.t array -> unitval require_global_for_quote : Ocaml_typing.Compilation_unit.Name.t -> unitval quoted_globals : unit -> Ocaml_typing.Compilation_unit.Name.t listval runtime_parameter_bindings :
unit ->
(Ocaml_typing.Global_module.t * Ocaml_typing.Ident.t) listval is_bound_to_runtime_parameter : Ocaml_typing.Ident.t -> boolval parameters : unit -> Ocaml_typing.Global_module.Parameter_name.t listval is_imported_opaque : Ocaml_typing.Compilation_unit.Name.t -> boolval register_import_as_opaque : Ocaml_typing.Compilation_unit.Name.t -> unitval is_parameter_unit : Ocaml_typing.Global_module.Name.t -> boolval implemented_parameter :
Ocaml_typing.Global_module.Name.t ->
Ocaml_typing.Global_module.Parameter_name.t optionval is_imported_parameter : Ocaml_typing.Global_module.Name.t -> boolval summary : Ocaml_typing.Env.t -> Ocaml_typing.Env.summaryval keep_only_summary : Ocaml_typing.Env.t -> Ocaml_typing.Env.tval env_of_only_summary :
(Ocaml_typing.Env.summary -> Ocaml_typing.Subst.t -> Ocaml_typing.Env.t) ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval update_short_paths : Ocaml_typing.Env.t -> Ocaml_typing.Env.tval short_paths : Ocaml_typing.Env.t -> Ocaml_typing.Short_paths.ttype error = | Missing_module of Ocaml_parsing.Location.t * Ocaml_typing.Path.t * Ocaml_typing.Path.t| Illegal_value_name of Ocaml_parsing.Location.t * string| Lookup_error of Ocaml_parsing.Location.t * Ocaml_typing.Env.t * Ocaml_typing.Env.lookup_error| Incomplete_instantiation of {unset_param : Ocaml_typing.Global_module.Parameter_name.t;
}| Toplevel_splice of Ocaml_parsing.Location.t| Unsupported_inside_quotation of Ocaml_parsing.Location.t * Ocaml_typing.Env.no_open_quotations_context
exception Error of Ocaml_typing.Env.errorval report_error :
level:int ->
Stdlib.Format.formatter ->
Ocaml_typing.Env.error ->
unitval report_lookup_error :
level:int ->
Ocaml_parsing.Location.t ->
Ocaml_typing.Env.t ->
Stdlib.Format.formatter ->
Ocaml_typing.Env.lookup_error ->
unitval in_signature : bool -> Ocaml_typing.Env.t -> Ocaml_typing.Env.tval is_in_signature : Ocaml_typing.Env.t -> boolval set_value_used_callback :
Ocaml_typing.Subst.Lazy.value_description ->
(unit -> unit) ->
unitval set_value_mutated_callback :
Ocaml_typing.Subst.Lazy.value_description ->
(unit -> unit) ->
unitval set_type_used_callback :
Ocaml_typing.Types.type_declaration ->
((unit -> unit) -> unit) ->
unitval check_functor_application :
(errors:bool ->
loc:Ocaml_parsing.Location.t ->
lid_whole_app:Ocaml_parsing.Longident.t ->
f0_path:Ocaml_typing.Path.t ->
args:(Ocaml_typing.Path.t * Ocaml_typing.Types.module_type) list ->
arg_path:Ocaml_typing.Path.t ->
arg_mty:Ocaml_typing.Types.module_type ->
param_mty:Ocaml_typing.Types.module_type ->
Ocaml_typing.Env.t ->
unit)
Stdlib.refval check_well_formed_module :
(Ocaml_typing.Env.t ->
Ocaml_parsing.Location.t ->
string ->
Ocaml_typing.Types.module_type ->
unit)
Stdlib.refval add_delayed_check_forward : ((unit -> unit) -> unit) Stdlib.refval scrape_alias :
(Ocaml_typing.Env.t ->
Ocaml_typing.Subst.Lazy.module_type ->
Ocaml_typing.Subst.Lazy.module_type)
Stdlib.refval same_constr :
(Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.type_expr ->
bool)
Stdlib.refval constrain_type_jkind :
(Ocaml_typing.Env.t ->
Ocaml_typing.Types.type_expr ->
Ocaml_typing.Types.jkind_r ->
(unit, Ocaml_typing.Jkind.Violation.t) Stdlib.result)
Stdlib.refval print_longident :
(Stdlib.Format.formatter -> Ocaml_parsing.Longident.t -> unit) Stdlib.refval print_path :
(Stdlib.Format.formatter -> Ocaml_typing.Path.t -> unit) Stdlib.refval print_type_expr :
(Stdlib.Format.formatter -> Ocaml_typing.Types.type_expr -> unit) Stdlib.refval shorten_module_path :
(Ocaml_typing.Env.t -> Ocaml_typing.Path.t -> Ocaml_typing.Path.t) Stdlib.refFolds
Folding over all identifiers (for analysis purpose)
val fold_values :
(string ->
Ocaml_typing.Path.t ->
Ocaml_typing.Subst.Lazy.value_description ->
Ocaml_typing.Mode.Value.l ->
'a ->
'a) ->
Ocaml_parsing.Longident.t option ->
Ocaml_typing.Env.t ->
'a ->
'aval fold_types :
(string ->
Ocaml_typing.Path.t ->
Ocaml_typing.Types.type_declaration ->
'a ->
'a) ->
Ocaml_parsing.Longident.t option ->
Ocaml_typing.Env.t ->
'a ->
'aval fold_constructors :
(Ocaml_typing.Types.constructor_description -> 'a -> 'a) ->
Ocaml_parsing.Longident.t option ->
Ocaml_typing.Env.t ->
'a ->
'aval fold_labels :
'rcd Ocaml_typing.Types.record_form ->
('rcd Ocaml_typing.Types.gen_label_description -> 'a -> 'a) ->
Ocaml_parsing.Longident.t option ->
Ocaml_typing.Env.t ->
'a ->
'aval fold_modules :
(string ->
Ocaml_typing.Path.t ->
Ocaml_typing.Subst.Lazy.module_declaration ->
'a ->
'a) ->
Ocaml_parsing.Longident.t option ->
Ocaml_typing.Env.t ->
'a ->
'aPersistent structures are only traversed if they are already loaded.
val fold_modtypes :
(string ->
Ocaml_typing.Path.t ->
Ocaml_typing.Subst.Lazy.modtype_declaration ->
'a ->
'a) ->
Ocaml_parsing.Longident.t option ->
Ocaml_typing.Env.t ->
'a ->
'aval fold_classes :
(string ->
Ocaml_typing.Path.t ->
Ocaml_typing.Types.class_declaration ->
'a ->
'a) ->
Ocaml_parsing.Longident.t option ->
Ocaml_typing.Env.t ->
'a ->
'aval fold_cltypes :
(string ->
Ocaml_typing.Path.t ->
Ocaml_typing.Types.class_type_declaration ->
'a ->
'a) ->
Ocaml_parsing.Longident.t option ->
Ocaml_typing.Env.t ->
'a ->
'aval check_value_name : string -> Ocaml_parsing.Location.t -> unitUtilities
val print_address : Stdlib.Format.formatter -> Ocaml_typing.Env.address -> unitval address_head : Ocaml_typing.Env.address -> Ocaml_typing.Env.address_headval print_stage : Stdlib.Format.formatter -> Ocaml_typing.Env.stage -> unitval unbound_class : Ocaml_typing.Path.tmerlin: manage internal state
val add_merlin_extension_module :
Ocaml_typing.Ident.t ->
Ocaml_typing.Types.module_type ->
Ocaml_typing.Env.t ->
Ocaml_typing.Env.tval scrape_lazy :
(Ocaml_typing.Env.t ->
Ocaml_typing.Subst.Lazy.module_type ->
Ocaml_typing.Subst.Lazy.module_type)
Stdlib.refval msupport_raise_error : (?ignore_unify:bool -> exn -> unit) Stdlib.refThis value should be filled in with Msupport.raise_error. Env cannot use this function directly because Msupport depends on Env
type 'acc fold_all_labels_f = {fold_all_labels_f : 'rcd. 'rcd Ocaml_typing.Types.record_form -> 'rcd Ocaml_typing.Types.gen_label_description -> 'acc -> 'acc;
}val fold_all_labels :
'a Ocaml_typing.Env.fold_all_labels_f ->
Ocaml_parsing.Longident.t option ->
Ocaml_typing.Env.t ->
'a ->
'aval print_with_quote_promote :
Stdlib.Format.formatter ->
(string * Ocaml_typing.Env.stage * Ocaml_typing.Env.stage) ->
unit