Merge commit 'ocaml3102'
[ocaml.git] / typing / typemod.mli
blob72823ac082298071787012e614dcc496d93557cc
1 (***********************************************************************)
2 (* *)
3 (* Objective Caml *)
4 (* *)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
6 (* *)
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
8 (* en Automatique. All rights reserved. This file is distributed *)
9 (* under the terms of the Q Public License version 1.0. *)
10 (* *)
11 (***********************************************************************)
13 (* $Id$ *)
15 (* Type-checking of the module language *)
17 open Types
18 open Format
20 val type_module:
21 Env.t -> Parsetree.module_expr -> Typedtree.module_expr
22 val type_structure:
23 Env.t -> Parsetree.structure -> Typedtree.structure * signature * Env.t
24 val type_implementation:
25 string -> string -> string -> Env.t -> Parsetree.structure ->
26 Typedtree.structure * Typedtree.module_coercion
27 val transl_signature:
28 Env.t -> Parsetree.signature -> signature
29 val check_nongen_schemes:
30 Env.t -> Typedtree.structure -> unit
32 val simplify_signature: signature -> signature
34 val package_units:
35 string list -> string -> string -> Typedtree.module_coercion
37 type error =
38 Unbound_module of Longident.t
39 | Unbound_modtype of Longident.t
40 | Cannot_apply of module_type
41 | Not_included of Includemod.error list
42 | Cannot_eliminate_dependency of module_type
43 | Signature_expected
44 | Structure_expected of module_type
45 | With_no_component of Longident.t
46 | With_mismatch of Longident.t * Includemod.error list
47 | Repeated_name of string * string
48 | Non_generalizable of type_expr
49 | Non_generalizable_class of Ident.t * class_declaration
50 | Non_generalizable_module of module_type
51 | Implementation_is_required of string
52 | Interface_not_compiled of string
54 exception Error of Location.t * error
56 val report_error: formatter -> error -> unit