ocaml-base-compiler
  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type value_unbound_reason =
  1. | Val_unbound_instance_variable
  2. | Val_unbound_self
  3. | Val_unbound_ancestor
  4. | Val_unbound_ghost_recursive of Location.t
type module_unbound_reason =
  1. | Mod_unbound_illegal_recursion
type summary =
  1. | Env_empty
  2. | Env_value of summary * Ident.t * Types.value_description
  3. | Env_type of summary * Ident.t * Types.type_declaration
  4. | Env_extension of summary * Ident.t * Types.extension_constructor
  5. | Env_module of summary * Ident.t * Types.module_presence * Types.module_declaration
  6. | Env_modtype of summary * Ident.t * Types.modtype_declaration
  7. | Env_class of summary * Ident.t * Types.class_declaration
  8. | Env_cltype of summary * Ident.t * Types.class_type_declaration
  9. | Env_open of summary * Path.t
    (*

    The string set argument of Env_open represents a list of module names to skip, i.e. that won't be imported in the toplevel namespace.

    *)
  10. | Env_functor_arg of summary * Ident.t
  11. | Env_constraints of summary * Types.type_declaration Path.Map.t
  12. | Env_copy_types of summary
  13. | Env_persistent of summary * Ident.t
  14. | Env_value_unbound of summary * string * value_unbound_reason
  15. | Env_module_unbound of summary * string * module_unbound_reason
type address =
  1. | Aident of Ident.t
  2. | Adot of address * int
type t
val empty : t
val initial_safe_string : t
val initial_unsafe_string : t
val diff : t -> t -> Ident.t list
val copy_local : from:t -> t -> t
type type_descriptions = Types.constructor_description list * Types.label_description list
type iter_cont
val iter_types : (Path.t -> (Path.t * Types.type_declaration) -> unit) -> t -> iter_cont
val run_iter_cont : iter_cont list -> (Path.t * iter_cont) list
val same_types : t -> t -> bool
val used_persistent : unit -> Types.Concr.t
val find_shadowed_types : Path.t -> t -> Path.t list
val without_cmis : ('a -> 'b) -> 'a -> 'b
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_ident_constructor : Ident.t -> t -> Types.constructor_description
val find_ident_label : Ident.t -> t -> Types.label_description
val find_type_expansion : Path.t -> t -> Types.type_expr list * Types.type_expr * int
val find_type_expansion_opt : Path.t -> t -> Types.type_expr list * Types.type_expr * int
val find_modtype_expansion : Path.t -> t -> Types.module_type
val find_hash_type : Path.t -> t -> Types.type_declaration
val find_value_address : Path.t -> t -> address
val find_module_address : Path.t -> t -> address
val find_class_address : Path.t -> t -> address
val find_constructor_address : Path.t -> t -> address
val add_functor_arg : Ident.t -> t -> t
val is_functor_arg : Path.t -> t -> bool
val normalize_module_path : Location.t option -> t -> Path.t -> Path.t
val normalize_type_path : Location.t option -> t -> Path.t -> Path.t
val normalize_path_prefix : Location.t option -> t -> Path.t -> Path.t
val normalize_modtype_path : 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 mark_value_used : Types.Uid.t -> unit
val mark_module_used : Types.Uid.t -> unit
val mark_type_used : Types.Uid.t -> unit
type constructor_usage =
  1. | Positive
  2. | Pattern
  3. | Privatize
val mark_constructor_used : constructor_usage -> Types.constructor_declaration -> unit
val mark_extension_used : constructor_usage -> Types.extension_constructor -> unit
type unbound_value_hint =
  1. | No_hint
  2. | Missing_rec of Location.t
type lookup_error =
  1. | Unbound_value of Longident.t * unbound_value_hint
  2. | Unbound_type of Longident.t
  3. | Unbound_constructor of Longident.t
  4. | Unbound_label of Longident.t
  5. | Unbound_module of Longident.t
  6. | Unbound_class of Longident.t
  7. | Unbound_modtype of Longident.t
  8. | Unbound_cltype of Longident.t
  9. | Unbound_instance_variable of string
  10. | Not_an_instance_variable of string
  11. | Masked_instance_variable of Longident.t
  12. | Masked_self_variable of Longident.t
  13. | Masked_ancestor_variable of Longident.t
  14. | Structure_used_as_functor of Longident.t
  15. | Abstract_used_as_functor of Longident.t
  16. | Functor_used_as_structure of Longident.t
  17. | Abstract_used_as_structure of Longident.t
  18. | Generative_used_as_applicative of Longident.t
  19. | Illegal_reference_to_recursive_module
  20. | Cannot_scrape_alias of Longident.t * Path.t
val lookup_error : Location.t -> t -> lookup_error -> 'a
val lookup_value : ?use:bool -> loc:Location.t ->