jon.recoil.org

Module Ocaml_typing.IncludemodSource

Sourcemodule Error : sig ... end
Sourcetype explanation = Env.t * Error.all
Sourcetype field_kind =
  1. | Field_value
  2. | Field_type
  3. | Field_exception
  4. | Field_typext
  5. | Field_module
  6. | Field_modtype
  7. | Field_class
  8. | Field_classtype
  9. | Field_jkind
Sourcetype field_desc = {
  1. name : string;
  2. kind : field_kind;
}
Sourceval kind_of_field_desc : field_desc -> string
Sourceval field_desc : field_kind -> Ident.t -> field_desc
Sourcemodule 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.

Sourceval is_runtime_component : Types.signature_item -> bool
Sourceval modes_toplevel : modes

The modes used for top-level inclusion check, where top-level is similiar to a structure

Sourceval modtypes_constraint : shape:Shape.t -> loc:Ocaml_parsing.Location.t -> Env.t -> mark:bool -> modes:modes -> Types.module_type -> Types.module_type -> Typedtree.module_coercion * Shape.t

modtypes_constraint ~shape ~loc env ~mark exp_modtype constraint_modtype checks that exp_modtype is a subtype of constraint_modtype, and returns the module coercion and the shape of the constrained module. It also marks as used paired items in positive position in exp_modtype, and also paired items in negative position in constraint_modtype. This marking in negative position allows to raise an unused item warning whenever an item in a functor parameter in constraint_modtype does not exist in exp_modtypes. This behaviour differs from the one in check_implementation and compunit which assumes that is not appropriate to raise warning about the interface file while typechecking the implementation file.

Sourceval strengthened_module_decl : loc:Ocaml_parsing.Location.t -> aliasable:bool -> Env.t -> mark:bool -> mmodes:modes -> Types.module_declaration -> Path.t -> Types.module_declaration -> Typedtree.module_coercion
Sourceval check_functor_application : loc:Ocaml_parsing.Location.t -> Env.t -> Types.module_type -> Path.t -> Types.module_type -> explanation option

check_functor_application ~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.

Sourceval check_modtype_equiv : loc:Ocaml_parsing.Location.t -> Env.t -> Ident.t -> Types.module_type -> Types.module_type -> unit
Sourceval signatures : Env.t -> mark:bool -> modes:modes -> Types.signature -> Types.signature -> Typedtree.module_coercion
Sourceval include_functor_signatures : Env.t -> mark:bool -> Types.signature -> Types.signature -> modes:modes -> (Ident.t * Typedtree.module_coercion) list
Sourceval check_implementation : Env.t -> modes:modes -> Types.signature -> Types.signature -> unit

Check an implementation against an interface

Sourceval compunit : Env.t -> mark:bool -> string -> modes:modes -> Types.signature -> string -> Types.signature -> Shape.t -> Typedtree.module_coercion * Shape.t
Sourceval compunit_as_argument : Env.t -> string -> modes:modes -> Types.signature -> string -> Types.signature -> Typedtree.module_coercion
Sourceval type_declarations : loc:Ocaml_parsing.Location.t -> Env.t -> mark:bool -> Ident.t -> Types.type_declaration -> Types.type_declaration -> unit
Sourceval jkind_declarations : loc:Ocaml_parsing.Location.t -> Env.t -> mark:bool -> Ident.t -> Types.jkind_declaration -> Types.jkind_declaration -> unit
Sourceval print_coercion : Format.formatter -> Typedtree.module_coercion -> unit
Sourcetype pos =
  1. | Module of Ident.t
  2. | Modtype of Ident.t
  3. | Arg of Types.functor_parameter
  4. | Body of Types.functor_parameter
Sourceexception Error of explanation
Sourcetype application_name =
  1. | Anonymous_functor
    (*

    (functor (_:sig end) -> struct end)(Int)

    *)
  2. | Full_application_path of Ocaml_parsing.Longident.t
    (*

    F(G(X).P)(Y)

    *)
  3. | Named_leftmost_functor of Ocaml_parsing.Longident.t
    (*

    F(struct end)...(...)

    *)
Sourceval expand_module_alias : strengthen:bool -> Env.t -> Path.t -> Types.module_type
Sourcemodule Functor_inclusion_diff : sig ... end
Sourcemodule Functor_app_diff : sig ... end