aboutsummaryrefslogtreecommitdiff
path: root/toplevel
diff options
context:
space:
mode:
authorletouzey2009-11-18 12:12:38 +0000
committerletouzey2009-11-18 12:12:38 +0000
commit7a662fdf712bf88192a3c4d0e7340d488da59ff4 (patch)
tree2b44a7092ba18068abc00641d41301ad20a6f1f7 /toplevel
parent2ddd0afea124874576b1468c3ce5830352be4322 (diff)
Allow interactive proofs in module types
Elie suggested this change, it seems that there are no real reasons to forbid interactive proofs in module types. A functor can now be written with Module Type, and can hence be used later as parameter of other functors (while it can also be translated to regular functor by a Include Type in a Module). See next commit for a example of diamond-shape developpement that become possible with this feature. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12533 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/vernacentries.ml13
1 files changed, 3 insertions, 10 deletions
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index 4fcd717bb4..c473fc6d2c 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -311,13 +311,9 @@ let vernac_definition (local,boxed,k) (loc,id as lid) def hook =
Dumpglob.dump_definition lid false "def";
(match def with
| ProveBody (bl,t) -> (* local binders, typ *)
- if Lib.is_modtype () then
- errorlabstrm "Vernacentries.VernacDefinition"
- (str "Proof editing mode not supported in module types.")
- else
- let hook _ _ = () in
- start_proof_and_print (local,DefinitionBody Definition)
- [Some lid, (bl,t)] hook
+ let hook _ _ = () in
+ start_proof_and_print (local,DefinitionBody Definition)
+ [Some lid, (bl,t)] hook
| DefineBody (bl,red_option,c,typ_opt) ->
let red_option = match red_option with
| None -> None
@@ -337,9 +333,6 @@ let vernac_start_proof kind l lettop hook =
if lettop then
errorlabstrm "Vernacentries.StartProof"
(str "Let declarations can only be used in proof editing mode.");
- if Lib.is_modtype () then
- errorlabstrm "Vernacentries.StartProof"
- (str "Proof editing mode not supported in module types.");
start_proof_and_print (Global, Proof kind) l hook
let vernac_end_proof = function