Module 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 :
Env.t ->
?expected_mode:Mode.Value.r ->
Parsetree.module_expr ->
Typedtree.module_expr * Shape.tval type_structure :
Env.t ->
?expected_mode:Mode.Value.r ->
Parsetree.structure ->
Typedtree.structure
* Types.signature
* Mode.Value.lr
* Typemod.Signature_names.t
* Shape.t
* Env.tval type_toplevel_phrase :
Env.t ->
Types.signature ->
Parsetree.structure ->
Typedtree.structure
* Types.signature
* Typemod.Signature_names.t
* Shape.t
* Env.tval type_implementation :
Unit_info.t ->
Compilation_unit.t ->
Env.t ->
Parsetree.structure ->
Typedtree.implementationval type_interface :
sourcefile:string ->
Compilation_unit.t ->
Env.t ->
Parsetree.signature ->
Typedtree.signatureval check_nongen_signature : Env.t -> Types.signature -> unitval modtype_of_package :
Env.t ->
Location.t ->
Path.t ->
(Longident.t * Types.type_expr) list ->
Types.module_typeval path_of_module : Typedtree.module_expr -> Path.t optionval save_signature :
Unit_info.t ->
Compilation_unit.t ->
Typedtree.signature ->
Env.t ->
Cmi_format.cmi_infos_lazy ->
unitval package_units :
Env.t ->
string list ->
Unit_info.Artifact.t ->
Compilation_unit.t ->
Typedtree.module_coercionval initial_env :
loc:Location.t ->
initially_opened_module:string option ->
open_implicit_modules:string list ->
Env.tmodule Sig_component_kind : sig ... endtype hiding_error = | Illegal_shadowing of {shadowed_item_id : Ident.t;shadowed_item_kind : Typemod.Sig_component_kind.t;shadowed_item_loc : Location.t;shadower_id : Ident.t;user_id : Ident.t;user_kind : Typemod.Sig_component_kind.t;user_loc : Location.t;
}| Appears_in_signature of {opened_item_id : Ident.t;opened_item_kind : Typemod.Sig_component_kind.t;user_id : Ident.t;user_kind : Typemod.Sig_component_kind.t;user_loc : Location.t;
}
Modules that are required to be legacy mode
Places where modes annotations are not supported
type error = | Cannot_apply of Types.module_type| Not_included of Includemod.explanation| Not_included_functor of Includemod.explanation| Cannot_eliminate_dependency of Typemod.functor_dependency_error * Types.module_type| Signature_expected| Structure_expected of Types.module_type| Functor_expected of Types.module_type| Signature_parameter_expected of Types.module_type| Signature_result_expected of Types.module_type| Recursive_include_functor| With_no_component of Longident.t| With_mismatch of Longident.t * Includemod.explanation| With_makes_applicative_functor_ill_typed of Longident.t * Path.t * Includemod.explanation| With_changes_module_alias of Longident.t * Ident.t * Path.t| With_cannot_remove_constrained_type| With_package_manifest of Longident.t * Types.type_expr| Repeated_name of Typemod.Sig_component_kind.t * string| Non_generalizable of {vars : Types.type_expr list;expression : Types.type_expr;
}| Non_generalizable_module of {vars : Types.type_expr list;item : Types.value_description;mty : 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 Types.type_expr| Incomplete_packed_module of Types.type_expr| Scoping_pack of Longident.t * Types.type_expr| Recursive_module_require_explicit_type| Apply_generative| Cannot_scrape_alias of Path.t| Cannot_scrape_package_type of Path.t| Badly_formed_signature of string * Typedecl.error| Cannot_hide_id of Typemod.hiding_error| Invalid_type_subst_rhs| Non_packable_local_modtype_subst of Path.t| With_cannot_remove_packed_modtype of Path.t * Types.module_type| Strengthening_mismatch of Longident.t * Includemod.explanation| Cannot_pack_parameter| Compiling_as_parameterised_parameter| Cannot_compile_implementation_as_parameter| Cannot_implement_parameter of Compilation_unit.Name.t * Misc.filepath| Argument_for_non_parameter of Global_module.Name.t * Misc.filepath| Cannot_find_argument_type of Global_module.Parameter_name.t| Inconsistent_argument_types of {new_arg_type : Global_module.Parameter_name.t option;old_arg_type : Global_module.Parameter_name.t option;old_source_file : Misc.filepath;
}| Duplicate_parameter_name of Global_module.Parameter_name.t| Submode_failed of Mode.Value.error| Item_weaker_than_structure of Mode.Value.error| Unsupported_modal_module of Typemod.unsupported_modal_module| Legacy_module of Typemod.legacy_module * Mode.Value.error
exception Error of Location.t * Env.t * Typemod.errorexception Error_forward of Location.errorval report_error : Env.t -> loc:Location.t -> Typemod.error -> Location.error