aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-04-09 12:31:04 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-04-09 12:31:04 +0000
commit2a0a543235f0c4cc5adc15629453e9a5dc99227d (patch)
treed2a0717e20558c306ea39b11661ece1f2531e2e6 /toplevel
parent25f601985661272aa7334a64c4e137217de351b3 (diff)
Bugs synchronisation pour gestion traduction des implicites
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3884 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/vernac.ml13
1 files changed, 9 insertions, 4 deletions
diff --git a/toplevel/vernac.ml b/toplevel/vernac.ml
index 1269ddfe3..5da98da62 100644
--- a/toplevel/vernac.ml
+++ b/toplevel/vernac.ml
@@ -140,16 +140,21 @@ let rec vernac_com interpfun (loc,com) =
Options.v7_only := true;
if !translate_file then msgnl (pr_comments !comments)
| _ ->
- let f = match com with (* Pour gérer les implicites *)
- | VernacInductive _ -> States.with_heavy_rollback
+ let protect = match com with (* Pour gérer les implicites *)
+ | VernacFixpoint _ | VernacInductive _ ->
+ fun f x ->
+ (let fs = States.freeze () in
+ try let e = f x in States.unfreeze fs; e
+ with e -> States.unfreeze fs; raise e)
| _ -> fun f -> f in
if !translate_file then
msgnl
- (pr_comments !comments ++ hov 0 (f pr_vernac com) ++ sep_end)
+ (pr_comments !comments ++ hov 0 (protect pr_vernac com) ++
+ sep_end)
else
msgnl
(hov 4 (str"New Syntax:" ++ fnl() ++ pr_comments !comments ++
- f pr_vernac com ++ sep_end)));
+ protect pr_vernac com ++ sep_end)));
comments := None;
Format.set_formatter_out_channel stdout);
interp com;