From 7a662fdf712bf88192a3c4d0e7340d488da59ff4 Mon Sep 17 00:00:00 2001 From: letouzey Date: Wed, 18 Nov 2009 12:12:38 +0000 Subject: 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 --- toplevel/vernacentries.ml | 13 +++---------- 1 file 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 -- cgit v1.2.3