Module Ocaml_typing.Typemod
Type-checking of the module language and typed ast hooks
Warning: this module is unstable and part of compiler-libs.
module Signature_names : sig ... endval type_module :
Ocaml_typing.Env.t ->
?expected_mode:Ocaml_typing.Mode.Value.r ->
Ocaml_parsing.Parsetree.module_expr ->
Ocaml_typing.Typedtree.module_expr * Ocaml_typing.Shape.tval type_structure :
Ocaml_typing.Env.t ->
?expected_mode:Ocaml_typing.Mode.Value.r ->
Ocaml_parsing.Parsetree.structure ->
Ocaml_typing.Typedtree.structure
* Ocaml_typing.Types.signature
* Ocaml_typing.Mode.Value.lr
* Ocaml_typing.Typemod.Signature_names.t
* Ocaml_typing.Shape.t
* Ocaml_typing.Env.tval type_toplevel_phrase :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.signature ->
Ocaml_parsing.Parsetree.structure ->
Ocaml_typing.Typedtree.structure
* Ocaml_typing.Types.signature
* Ocaml_typing.Shape.t
* Ocaml_typing.Env.tval type_implementation :
Ocaml_typing.Unit_info.t ->
Ocaml_typing.Compilation_unit.t ->
Ocaml_typing.Env.t ->
Ocaml_parsing.Parsetree.structure ->
Ocaml_typing.Typedtree.implementationval type_interface :
sourcefile:string ->
Ocaml_typing.Compilation_unit.t ->
Ocaml_typing.Env.t ->
Ocaml_parsing.Parsetree.signature ->
Ocaml_typing.Typedtree.signatureval transl_signature :
Ocaml_typing.Env.t ->
Ocaml_parsing.Parsetree.signature ->
Ocaml_typing.Typedtree.signatureval check_nongen_signature :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.signature ->
unitval modtype_of_package :
Ocaml_typing.Env.t ->
Ocaml_parsing.Location.t ->
Ocaml_typing.Path.t ->
(Ocaml_parsing.Longident.t * Ocaml_typing.Types.type_expr) list ->
Ocaml_typing.Types.module_typeval path_of_module :
Ocaml_typing.Typedtree.module_expr ->
Ocaml_typing.Path.t optionval save_signature :
Ocaml_typing.Unit_info.t ->
Ocaml_typing.Compilation_unit.t ->
Ocaml_typing.Typedtree.signature ->
Ocaml_typing.Env.t ->
Ocaml_typing.Cmi_format.cmi_infos_lazy ->
unitval package_units :
Ocaml_typing.Env.t ->
string list ->
Ocaml_typing.Unit_info.Artifact.t ->
Ocaml_typing.Compilation_unit.t ->
Ocaml_typing.Typedtree.module_coercionval initial_env :
loc:Ocaml_parsing.Location.t ->
initially_opened_module:string option ->
open_implicit_modules:string list ->
Ocaml_typing.Env.tmodule Sig_component_kind : sig ... endtype hiding_error = | Illegal_shadowing of {shadowed_item_id : Ocaml_typing.Ident.t;shadowed_item_kind : Ocaml_typing.Typemod.Sig_component_kind.t;shadowed_item_loc : Ocaml_parsing.Location.t;shadower_id : Ocaml_typing.Ident.t;user_id : Ocaml_typing.Ident.t;user_kind : Ocaml_typing.Typemod.Sig_component_kind.t;user_loc : Ocaml_parsing.Location.t;
}| Appears_in_signature of {opened_item_id : Ocaml_typing.Ident.t;opened_item_kind : Ocaml_typing.Typemod.Sig_component_kind.t;user_id : Ocaml_typing.Ident.t;user_kind : Ocaml_typing.Typemod.Sig_component_kind.t;user_loc : Ocaml_parsing.Location.t;
}
Modules that are required to be legacy mode
Places where modes annotations are not supported
type error = | Cannot_apply of Ocaml_typing.Types.module_type| Not_included of Ocaml_typing.Includemod.explanation| Not_included_functor of Ocaml_typing.Includemod.explanation| Cannot_eliminate_dependency of Ocaml_typing.Typemod.functor_dependency_error * Ocaml_typing.Types.module_type| Signature_expected| Structure_expected of Ocaml_typing.Types.module_type| Functor_expected of Ocaml_typing.Types.module_type| Signature_parameter_expected of Ocaml_typing.Types.module_type| Signature_result_expected of Ocaml_typing.Types.module_type| Recursive_include_functor| With_no_component of Ocaml_parsing.Longident.t| With_mismatch of Ocaml_parsing.Longident.t * Ocaml_typing.Includemod.explanation| With_makes_applicative_functor_ill_typed of Ocaml_parsing.Longident.t * Ocaml_typing.Path.t * Ocaml_typing.Includemod.explanation| With_changes_module_alias of Ocaml_parsing.Longident.t * Ocaml_typing.Ident.t * Ocaml_typing.Path.t| With_cannot_remove_constrained_type| With_package_manifest of Ocaml_parsing.Longident.t * Ocaml_typing.Types.type_expr| Repeated_name of Ocaml_typing.Typemod.Sig_component_kind.t * string| Non_generalizable of {vars : Ocaml_typing.Types.type_expr list;expression : Ocaml_typing.Types.type_expr;
}| Non_generalizable_module of {vars : Ocaml_typing.Types.type_expr list;item : Ocaml_typing.Types.value_description;mty : Ocaml_typing.Types.module_type;
}| Implementation_is_required of string| Interface_not_compiled of string| Not_allowed_in_functor_body| Not_includable_in_functor_body| Not_a_packed_module of Ocaml_typing.Types.type_expr| Incomplete_packed_module of Ocaml_typing.Types.type_expr| Scoping_pack of Ocaml_parsing.Longident.t * Ocaml_typing.Types.type_expr| Recursive_module_require_explicit_type| Apply_generative| Cannot_scrape_alias of Ocaml_typing.Path.t| Cannot_scrape_package_type of Ocaml_typing.Path.t| Badly_formed_signature of string * Ocaml_typing.Typedecl.error| Cannot_hide_id of Ocaml_typing.Typemod.hiding_error| Invalid_type_subst_rhs| Non_packable_local_modtype_subst of Ocaml_typing.Path.t| With_cannot_remove_packed_modtype of Ocaml_typing.Path.t * Ocaml_typing.Types.module_type| Strengthening_mismatch of Ocaml_parsing.Longident.t * Ocaml_typing.Includemod.explanation| Cannot_pack_parameter| Compiling_as_parameterised_parameter| Cannot_compile_implementation_as_parameter| Cannot_implement_parameter of Ocaml_typing.Compilation_unit.Name.t * Merlin_utils.Misc.filepath| Argument_for_non_parameter of Ocaml_typing.Global_module.Name.t * Merlin_utils.Misc.filepath| Cannot_find_argument_type of Ocaml_typing.Global_module.Parameter_name.t| Inconsistent_argument_types of {new_arg_type : Ocaml_typing.Global_module.Parameter_name.t option;old_arg_type : Ocaml_typing.Global_module.Parameter_name.t option;old_source_file : Merlin_utils.Misc.filepath;
}| Duplicate_parameter_name of Ocaml_typing.Global_module.Parameter_name.t| Submode_failed of Ocaml_typing.Mode.Value.error| Item_weaker_than_structure of Ocaml_typing.Mode.Value.error| Unsupported_modal_module of Ocaml_typing.Typemod.unsupported_modal_module| Legacy_module of Ocaml_typing.Typemod.legacy_module * Ocaml_typing.Mode.Value.error
exception Error of Ocaml_parsing.Location.t
* Ocaml_typing.Env.t
* Ocaml_typing.Typemod.errorexception Error_forward of Ocaml_parsing.Location.errorval report_error :
Ocaml_typing.Env.t ->
loc:Ocaml_parsing.Location.t ->
Ocaml_typing.Typemod.error ->
Ocaml_parsing.Location.errorClear several bits of global state that may retain large amounts of memory after typechecking is finished.
val normalize_signature : Ocaml_typing.Types.signature -> unitval merlin_type_structure :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.signature ->
Ocaml_parsing.Parsetree.structure ->
Ocaml_typing.Typedtree.structure
* Ocaml_typing.Types.signature
* Ocaml_typing.Env.tval merlin_transl_signature :
Ocaml_typing.Env.t ->
Ocaml_typing.Types.signature ->
Ocaml_parsing.Parsetree.signature ->
Ocaml_typing.Typedtree.signature