ocaml-base-compiler

Official release 4.14.0
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library ocamlcommon
Module Includemod
type mark =
| Mark_both(*

Mark definitions used from both arguments

*)
| Mark_positive(*

Mark definitions used from the positive (first) argument

*)
| Mark_negative(*

Mark definitions used from the negative (second) argument

*)
| Mark_neither(*

Do not mark definitions used from either argument

*)

Type describing which arguments of an inclusion to consider as used for the usage warnings. Mark_both is the default.

module Error : sig ... end
type explanation = Env.t * Error.all
type field_kind =
| Field_value
| Field_type
| Field_exception
| Field_typext
| Field_module
| Field_modtype
| Field_class
| Field_classtype
type field_desc = {
name : string;
kind : field_kind;
}
val kind_of_field_desc : field_desc -> string
val field_desc : field_kind -> Ident.t -> field_desc
module FieldMap : Map.S with type key = field_desc

Map indexed by both field types and names. This avoids name clashes between different sorts of fields such as values and types.

val item_ident_name : Types.signature_item -> Ident.t * Location.t * field_desc
val is_runtime_component : Types.signature_item -> bool
val modtypes_with_shape : shape:Shape.t -> loc:Location.t -> Env.t -> mark:mark -> Types.module_type -> Types.module_type -> Typedtree.module_coercion * Shape.t
val strengthened_module_decl : loc:Location.t -> aliasable:bool -> Env.t -> mark:mark -> Types.module_declaration -> Path.t -> Types.module_declaration -> Typedtree.module_coercion
val check_modtype_inclusion : loc:Location.t -> Env.t -> Types.module_type -> Path.t -> Types.module_type -> explanation option

check_modtype_inclusion ~loc env mty1 path1 mty2 checks that the functor application F(M) is well typed, where mty2 is the type of the argument of F and path1/mty1 is the path/unstrenghened type of M.

val check_modtype_equiv : loc:Location.t -> Env.t -> Ident.t -> Types.module_type -> Types.module_type -> unit
val compunit : Env.t -> mark:mark -> string -> Types.signature -> string -> Types.signature -> Shape.t -> Typedtree.module_coercion * Shape.t
val type_declarations : loc:Location.t -> Env.t -> mark:mark -> Ident.t -> Types.type_declaration -> Types.type_declaration -> unit
val print_coercion : Format.formatter -> Typedtree.module_coercion -> unit
type symptom =
| Missing_field of Ident.t * Location.t * string
| Value_descriptions of Ident.t * Types.value_description * Types.value_description * Includecore.value_mismatch
| Type_declarations of Ident.t * Types.type_declaration * Types.type_declaration * Includecore.type_mismatch
| Extension_constructors of Ident.t * Types.extension_constructor * Types.extension_constructor * Includecore.extension_constructor_mismatch
| Module_types of Types.module_type * Types.module_type
| Modtype_infos of Ident.t * Types.modtype_declaration * Types.modtype_declaration
| Modtype_permutation of Types.module_type * Typedtree.module_coercion
| Interface_mismatch of string * string
| Class_type_declarations of Ident.t * Types.class_type_declaration * Types.class_type_declaration * Ctype.class_match_failure list
| Class_declarations of Ident.t * Types.class_declaration * Types.class_declaration * Ctype.class_match_failure list
| Unbound_module_path of Path.t
| Invalid_module_alias of Path.t
type pos =
| Module of Ident.t
| Modtype of Ident.t
| Arg of Types.functor_parameter
| Body of Types.functor_parameter
exception Error of explanation
exception Apply_error of {
loc : Location.t;
env : Env.t;
lid_app : Longident.t option;
mty_f : Types.module_type;
args : (Error.functor_arg_descr * Types.module_type) list;
}
val expand_module_alias : strengthen:bool -> Env.t -> Path.t -> Types.module_type
module Functor_inclusion_diff : sig ... end
module Functor_app_diff : sig ... end