From 2a0a543235f0c4cc5adc15629453e9a5dc99227d Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 9 Apr 2003 12:31:04 +0000 Subject: 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 --- toplevel/vernac.ml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'toplevel') 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; -- cgit v1.2.3