1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
9
(*i $Id: modops.mli 9821 2007-05-11 17:00:58Z aspiwack $ i*)
20
(* Various operations on modules and module types *)
22
(* make the environment entry out of type *)
23
val module_body_of_type : module_type_body -> module_body
25
val module_type_of_module : module_path option -> module_body ->
29
env -> struct_expr_body -> mod_bound_id * module_type_body * struct_expr_body
31
(* Evaluation functions *)
32
val eval_struct : env -> struct_expr_body -> struct_expr_body
34
val type_of_mb : env -> module_body -> struct_expr_body
36
(* [add_signature mp sign env] assumes that the substitution [msid]
37
$\mapsto$ [mp] has already been performed (or is not necessary, like
38
when [mp = MPself msid]) *)
39
val add_signature : module_path -> structure_body -> env -> env
41
(* adds a module and its components, but not the constraints *)
42
val add_module : module_path -> module_body -> env -> env
44
val check_modpath_equiv : env -> module_path -> module_path -> unit
46
val strengthen : env -> struct_expr_body -> module_path -> struct_expr_body
48
val update_subst : env -> module_body -> module_path -> bool * substitution
50
val error_incompatible_modtypes :
51
module_type_body -> module_type_body -> 'a
53
val error_not_match : label -> structure_field_body -> 'a
55
val error_with_incorrect : label -> 'a
57
val error_no_such_label : label -> 'a
59
val error_no_such_label_sub :
60
label -> mod_self_id -> mod_self_id -> 'a
62
val error_signature_expected : struct_expr_body -> 'a
64
val error_not_a_constant : label -> 'a
66
val error_not_a_module : label -> 'a
68
val error_a_generative_module_expected : label -> 'a
70
val error_application_to_not_path : struct_expr_body -> 'a