Up

module Env

: sig
#
type summary =
# | Env_empty
# | Env_value of summary * Ident.t * Types.value_description
# | Env_type of summary * Ident.t * Types.type_declaration
# | Env_extension of summary * Ident.t * Types.extension_constructor
# | Env_module of summary * Ident.t * Types.module_declaration
# | Env_modtype of summary * Ident.t * Types.modtype_declaration
# | Env_class of summary * Ident.t * Types.class_declaration
# | Env_open of summary * Path.t
# | Env_functor_arg of summary * Ident.t
#
type t
#
val empty : t
#
val initial_safe_string : t
#
val initial_unsafe_string : t
#
val diff : t -> t -> Ident.t list
#
type type_descriptions = Types.constructor_description list * Types.label_description list
#
val iter_types : (Path.t -> Path.t * (Types.type_declaration * type_descriptions) -> unit) -> t -> unit
#
val same_types : t -> t -> bool
#
val used_persistent : unit -> Types.Concr.t
#
val find_shadowed_types : Path.t -> t -> Path.t list
#
val find_value : Path.t -> t -> Types.value_description
#
val find_type : Path.t -> t -> Types.type_declaration
#
val find_type_descrs : Path.t -> t -> type_descriptions
#
val find_module : Path.t -> t -> Types.module_declaration
#
val find_modtype : Path.t -> t -> Types.modtype_declaration
#
val find_class : Path.t -> t -> Types.class_declaration
#
val find_cltype : Path.t -> t -> Types.class_type_declaration
#
val find_type_expansion : Path.t -> t -> Types.type_expr list * Types.type_expr * int option
#
val find_type_expansion_opt : Path.t -> t -> Types.type_expr list * Types.type_expr * int option
#
val find_modtype_expansion : Path.t -> t -> Types.module_type
#
val is_functor_arg : Path.t -> t -> bool
#
val normalize_path : Location.t option -> t -> Path.t -> Path.t
#
val reset_required_globals : unit -> unit
#
val get_required_globals : unit -> Ident.t list
#
val add_required_global : Ident.t -> unit
#
val has_local_constraints : t -> bool
#
val add_gadt_instance_level : int -> t -> t
#
val gadt_instance_level : t -> Types.type_expr -> int option
#
val add_gadt_instances : t -> int -> Types.type_expr list -> unit
#
val add_gadt_instance_chain : t -> int -> Types.type_expr -> unit
#
val lookup_value : Longident.t -> t -> Path.t * Types.value_description
#
val lookup_constructor : Longident.t -> t -> Types.constructor_description
#
val lookup_all_constructors : Longident.t -> t -> (Types.constructor_description * (unit -> unit)) list
#
val lookup_label : Longident.t -> t -> Types.label_description
#
val lookup_all_labels : Longident.t -> t -> (Types.label_description * (unit -> unit)) list
#
val lookup_type : Longident.t -> t -> Path.t * Types.type_declaration
#
val lookup_module : load:bool -> Longident.t -> t -> Path.t
#
val lookup_modtype : Longident.t -> t -> Path.t * Types.modtype_declaration
#
val lookup_class : Longident.t -> t -> Path.t * Types.class_declaration
#
val lookup_cltype : Longident.t -> t -> Path.t * Types.class_type_declaration
#
exception Recmodule
#
val add_value : ?check:(string -> Warnings.t) -> Ident.t -> Types.value_description -> t -> t
#
val add_type : check:bool -> Ident.t -> Types.type_declaration -> t -> t
#
val add_extension : check:bool -> Ident.t -> Types.extension_constructor -> t -> t
#
val add_module : ?arg:bool -> Ident.t -> Types.module_type -> t -> t
#
val add_module_declaration : ?arg:bool -> Ident.t -> Types.module_declaration -> t -> t
#
val add_modtype : Ident.t -> Types.modtype_declaration -> t -> t
#
val add_class : Ident.t -> Types.class_declaration -> t -> t
#
val add_cltype : Ident.t -> Types.class_type_declaration -> t -> t
#
val add_local_constraint : Ident.t -> Types.type_declaration -> int -> t -> t
#
val add_item : Types.signature_item -> t -> t
#
val add_signature : Types.signature -> t -> t
#
val open_signature : ?loc:Location.t -> ?toplevel:bool -> Asttypes.override_flag -> Path.t -> Types.signature -> t -> t
#
val open_pers_signature : string -> t -> t
#
val enter_value : ?check:(string -> Warnings.t) -> string -> Types.value_description -> t -> Ident.t * t
#
val enter_type : string -> Types.type_declaration -> t -> Ident.t * t
#
val enter_extension : string -> Types.extension_constructor -> t -> Ident.t * t
#
val enter_module : ?arg:bool -> string -> Types.module_type -> t -> Ident.t * t
#
val enter_module_declaration : ?arg:bool -> string -> Types.module_declaration -> t -> Ident.t * t
#
val enter_modtype : string -> Types.modtype_declaration -> t -> Ident.t * t
#
val enter_class : string -> Types.class_declaration -> t -> Ident.t * t
#
val enter_cltype : string -> Types.class_type_declaration -> t -> Ident.t * t
#
val reset_cache : unit -> unit
#
val reset_cache_toplevel : unit -> unit
#
val set_unit_name : string -> unit
#
val read_signature : string -> string -> Types.signature
#
val save_signature : Types.signature -> string -> string -> Types.signature
#
val save_signature_with_imports : Types.signature -> string -> string -> (string * Digest.t option) list -> Types.signature
#
val crc_of_unit : string -> Digest.t
#
val imports : unit -> (string * Digest.t option) list
#
val crc_units : Consistbl.t
#
val add_import : string -> unit
#
val summary : t -> summary
#
val keep_only_summary : t -> t
#
val env_of_only_summary : (summary -> Subst.t -> t) -> t -> t
#
type error =
# | Illegal_renaming of string * string * string
# | Inconsistent_import of string * string * string
# | Need_recursive_types of string * string
# | Missing_module of Location.t * Path.t * Path.t
#
exception Error of error
#
val report_error : Format.formatter -> error -> unit
#
val mark_value_used : t -> string -> Types.value_description -> unit
#
val mark_type_used : t -> string -> Types.type_declaration -> unit
#
type constructor_usage =
# | Positive
# | Pattern
# | Privatize
#
val mark_constructor_used : constructor_usage -> t -> string -> Types.type_declaration -> string -> unit
#
val mark_constructor : constructor_usage -> t -> string -> Types.constructor_description -> unit
#
val mark_extension_used : constructor_usage -> t -> Types.extension_constructor -> string -> unit
#
val in_signature : t -> t
#
val implicit_coercion : t -> t
#
val set_value_used_callback : string -> Types.value_description -> (unit -> unit) -> unit
#
val set_type_used_callback : string -> Types.type_declaration -> ((unit -> unit) -> unit) -> unit
#
val check_modtype_inclusion : (t -> Types.module_type -> Path.t -> Types.module_type -> unit) Pervasives.ref
#
val add_delayed_check_forward : ((unit -> unit) -> unit) Pervasives.ref
#
val strengthen : (t -> Types.module_type -> Path.t -> Types.module_type) Pervasives.ref
#
val fold_values : (string -> Path.t -> Types.value_description -> 'a -> 'a) -> Longident.t option -> t -> 'a -> 'a
#
val fold_types : (string -> Path.t -> Types.type_declaration * type_descriptions -> 'a -> 'a) -> Longident.t option -> t -> 'a -> 'a
#
val fold_constructors : (Types.constructor_description -> 'a -> 'a) -> Longident.t option -> t -> 'a -> 'a
#
val fold_labels : (Types.label_description -> 'a -> 'a) -> Longident.t option -> t -> 'a -> 'a
#
val fold_modules : (string -> Path.t -> Types.module_declaration -> 'a -> 'a) -> Longident.t option -> t -> 'a -> 'a
#
val fold_modtypes : (string -> Path.t -> Types.modtype_declaration -> 'a -> 'a) -> Longident.t option -> t -> 'a -> 'a
#
val fold_classs : (string -> Path.t -> Types.class_declaration -> 'a -> 'a) -> Longident.t option -> t -> 'a -> 'a
#
val fold_cltypes : (string -> Path.t -> Types.class_type_declaration -> 'a -> 'a) -> Longident.t option -> t -> 'a -> 'a
#
val scrape_alias : t -> Types.module_type -> Types.module_type
end