aboutsummaryrefslogtreecommitdiff
path: root/toplevel
diff options
context:
space:
mode:
authorletouzey2009-12-07 15:24:13 +0000
committerletouzey2009-12-07 15:24:13 +0000
commit35159e8aa9bf33b4882bc7f17c2e363f769624c7 (patch)
treeb4791a8db7bcc1369025b1d261dc6d2a6301278c /toplevel
parent78ad7ad114f3872c3e1c48e8427bee1351c25962 (diff)
No more specific syntax "Include Self" for inclusion of partially-applied functors
For Module F(X:SIG), making now a Include F will try to find the X fields in the current context, just as was doing earlier Include Self F. This specific syntax is removed, freeing the keyword "Self". Anyway, with the use of the syntax "<+" there was already hardly any need for syntax "Include Self". Idem for Include Type. Beware that a typo such as "Include F" instead of "Include F G" will produce a different message now, about a missing field instead of a not-enough-applied functor. By the way, some code clean-up and factorisation of inner recursive functions in declaremods.ml. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12566 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/vernacentries.ml14
-rw-r--r--toplevel/vernacexpr.ml2
2 files changed, 8 insertions, 8 deletions
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index e7d32782d6..69a76bcc8c 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -550,13 +550,13 @@ let vernac_end_modtype (loc,id) =
Dumpglob.dump_modref loc mp "modtype";
if_verbose message ("Module Type "^ string_of_id id ^" is defined")
-let vernac_include is_self = function
- | CIMTE (mty,mtys) ->
+let vernac_include = function
+ | CIMTE mtys ->
Declaremods.declare_include
- Modintern.interp_modtype mty mtys false is_self
- | CIME (mexpr, mexprs) ->
+ Modintern.interp_modtype mtys false
+ | CIME mexprs ->
Declaremods.declare_include
- Modintern.interp_modexpr mexpr mexprs true is_self
+ Modintern.interp_modexpr mexprs true
(**********************)
(* Gallina extensions *)
@@ -1328,8 +1328,8 @@ let interp c = match c with
vernac_define_module export lid bl mtys mexprl
| VernacDeclareModuleType (lid,bl,mtys,mtyo) ->
vernac_declare_module_type lid bl mtys mtyo
- | VernacInclude (is_self,in_asts) ->
- vernac_include is_self in_asts
+ | VernacInclude in_asts ->
+ vernac_include in_asts
(* Gallina extensions *)
| VernacBeginSection lid -> vernac_begin_section lid
diff --git a/toplevel/vernacexpr.ml b/toplevel/vernacexpr.ml
index f75e1771d8..74974c9d1f 100644
--- a/toplevel/vernacexpr.ml
+++ b/toplevel/vernacexpr.ml
@@ -270,7 +270,7 @@ type vernac_expr =
module_binder list * module_type_ast module_signature * module_ast list
| VernacDeclareModuleType of lident *
module_binder list * module_type_ast list * module_type_ast list
- | VernacInclude of bool * include_ast
+ | VernacInclude of include_ast
(* Solving *)