Skip to content
Yotam Barnoy edited this page Apr 23, 2015 · 4 revisions

The Env module contains a global environment used by the compiler. EnvTbl.t is a map (provided by the Ident Module) mapping Ident.t to 'a that is used to store many kinds of entity that persist in the environment.

Env.t

  • Contains the tables maintained in the environment.
  • values: name to Path.t * value_description.
  • constrs: name to constructor_description.
  • labels: name to label_description
  • types: name to Path.t * type_declaration * type_description
  • modules: name to Path.t * module_declaration
  • modtypes: name to Path.t * modtype_declaration
  • components: name to Path.t * module_components
  • classes: name to Path.t * class_declaration
  • cltypes: name to Path.t * class_type_declaration
  • functor_args: set of identifiers.
  • summary: summary.
  • local_constraints: bool.
  • gadt_instances: list of (int * set of Type.type_exprs)

Members

  • value_declarations: a table mapping name(string) and Location.t to a unit function, which is called whenever the value is used.
  • type_declarations
  • used_constructors: a table mapping name, Location.t, string to constructor_usage -> unit function.

add_type/add_extension

Clone this wiki locally