summaryrefslogtreecommitdiff
path: root/typing/env.mli
diff options
context:
space:
mode:
Diffstat (limited to 'typing/env.mli')
-rw-r--r--typing/env.mli67
1 files changed, 3 insertions, 64 deletions
diff --git a/typing/env.mli b/typing/env.mli
index 3dbf7092da..44d0491ed3 100644
--- a/typing/env.mli
+++ b/typing/env.mli
@@ -16,13 +16,6 @@
open Types
-module EnvLazy : sig
- type ('a,'b) t
-
- val force : ('a -> 'b) -> ('a,'b) t -> 'b
- val create : 'a -> ('a,'b) t
-end
-
type summary =
Env_empty
| Env_value of summary * Ident.t * value_description
@@ -34,61 +27,7 @@ type summary =
| Env_cltype of summary * Ident.t * class_type_declaration
| Env_open of summary * Path.t
-module EnvTbl : sig
- type 'a t
-
- val find_same_not_using : Ident.t -> 'a t -> 'a
- val keys : 'a t -> Ident.t list
-end
-
-type t = {
- values: (Path.t * value_description) EnvTbl.t;
- annotations: (Path.t * Annot.ident) EnvTbl.t;
- constrs: (Path.t * constructor_description) EnvTbl.t;
- labels: (Path.t * label_description) EnvTbl.t;
- constrs_by_path: (Path.t * (constructor_description list)) EnvTbl.t;
- types: (Path.t * type_declaration) EnvTbl.t;
- modules: (Path.t * module_type) EnvTbl.t;
- modtypes: (Path.t * modtype_declaration) EnvTbl.t;
- components: (Path.t * module_components) EnvTbl.t;
- classes: (Path.t * class_declaration) EnvTbl.t;
- cltypes: (Path.t * class_type_declaration) EnvTbl.t;
- summary: summary;
- local_constraints: bool;
- gadt_instances: (int * Btype.TypeSet.t ref) list;
- in_signature: bool;
-}
-
-and module_components = (t * Subst.t * Path.t * Types.module_type,module_components_repr) EnvLazy.t
-
-and module_components_repr =
- Structure_comps of structure_components
- | Functor_comps of functor_components
-
-and structure_components = {
- mutable comp_values: (string, (value_description * int)) Tbl.t;
- mutable comp_annotations: (string, (Annot.ident * int)) Tbl.t;
- mutable comp_constrs: (string, (constructor_description * int)) Tbl.t;
- mutable comp_labels: (string, (label_description * int)) Tbl.t;
- mutable comp_constrs_by_path:
- (string, (constructor_description list * int)) Tbl.t;
- mutable comp_types: (string, (type_declaration * int)) Tbl.t;
- mutable comp_modules: (string, ( (Subst.t * Types.module_type,module_type) EnvLazy.t * int)) Tbl.t;
- mutable comp_modtypes: (string, (modtype_declaration * int)) Tbl.t;
- mutable comp_components: (string, (module_components * int)) Tbl.t;
- mutable comp_classes: (string, (class_declaration * int)) Tbl.t;
- mutable comp_cltypes: (string, (class_type_declaration * int)) Tbl.t
-}
-
-and functor_components = {
- fcomp_param: Ident.t; (* Formal parameter *)
- fcomp_arg: module_type; (* Argument signature *)
- fcomp_res: module_type; (* Result signature *)
- fcomp_env: t; (* Environment in which the result signature makes sense *)
- fcomp_subst: Subst.t; (* Prefixing substitution for the result signature *)
- fcomp_cache: (Path.t, module_components) Hashtbl.t (* For memoization *)
-}
-
+type t
val empty: t
val initial: t
@@ -175,10 +114,10 @@ val set_unit_name: string -> unit
val read_signature: string -> string -> signature
(* Arguments: module name, file name. Results: signature. *)
-val save_signature: signature -> string -> string -> unit
+val save_signature: signature -> string -> string -> signature
(* Arguments: signature, module name, file name. *)
val save_signature_with_imports:
- signature -> string -> string -> (string * Digest.t) list -> unit
+ signature -> string -> string -> (string * Digest.t) list -> signature
(* Arguments: signature, module name, file name,
imported units with their CRCs. *)