aboutsummaryrefslogtreecommitdiff
path: root/kernel/modops.ml
diff options
context:
space:
mode:
authorletouzey2010-01-07 15:32:49 +0000
committerletouzey2010-01-07 15:32:49 +0000
commit9b6517c0c933fb1d66c7feb53fa57e1697d8124a (patch)
treed914d6bc2c5598baad03807ce40ada0b1d56045d /kernel/modops.ml
parente3e6ff629e258269bc9fe06f7be99a2d5f334071 (diff)
Include can accept both Module and Module Type
Syntax Include Type is still active, but deprecated, and triggers a warning. The syntax M <+ M' <+ M'', which performs internally an Include, also benefits from this: M, M', M'' can be independantly modules or module type. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12640 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/modops.ml')
-rw-r--r--kernel/modops.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/modops.ml b/kernel/modops.ml
index 8c014c1d7d..000b2d65e6 100644
--- a/kernel/modops.ml
+++ b/kernel/modops.ml
@@ -61,6 +61,9 @@ let error_not_a_modtype_loc loc s =
let error_not_a_module_loc loc s =
user_err_loc (loc,"",str ("\""^s^"\" is not a module."))
+let error_not_a_module_or_modtype_loc loc s =
+ user_err_loc (loc,"",str ("\""^s^"\" is not a module or module type."))
+
let error_not_a_module s = error_not_a_module_loc dummy_loc s
let error_not_a_constant l =
@@ -86,6 +89,9 @@ let error_local_context lo =
let error_no_such_label_sub l l1 =
error ("The field "^(string_of_label l)^" is missing in "^l1^".")
+let error_with_in_module _ = error "The syntax \"with\" is not allowed for modules."
+
+let error_application_to_module_type _ = error "Module application to a module type."
let destr_functor env mtb =
match mtb with