diff options
| author | herbelin | 2013-05-05 22:47:35 +0000 |
|---|---|---|
| committer | herbelin | 2013-05-05 22:47:35 +0000 |
| commit | df313cefbaddb57f89650171e59e3abcb168a273 (patch) | |
| tree | d454b60baf938da9a3c2a59e70fc474750057b0f /lib/flags.ml | |
| parent | 9b67b88dc13cbd0720cf88e105a60732f8ab619b (diff) | |
Now printing body of abbreviations (i.e. notation with a name) with
full usage of notations instead of the previous cheap way to prevent
circularity in printing by deactivating all notations.
(Since "->" became a notation, printing abbreviations without
notations at all had become even more inconvenient).
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16470 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/flags.ml')
| -rw-r--r-- | lib/flags.ml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/flags.ml b/lib/flags.ml index d931ad9870..d8355e3e10 100644 --- a/lib/flags.ml +++ b/lib/flags.ml @@ -8,14 +8,22 @@ let with_option o f x = let old = !o in o:=true; + try let r = f x in o := old; r + with reraise -> + let reraise = Backtrace.add_backtrace reraise in + let () = o := old in + raise reraise + +let without_option o f x = + let old = !o in o:=false; try let r = f x in o := old; r with reraise -> let reraise = Backtrace.add_backtrace reraise in let () = o := old in raise reraise -let without_option o f x = - let old = !o in o:=false; +let with_extra_values o l f x = + let old = !o in o:=old@l; try let r = f x in o := old; r with reraise -> let reraise = Backtrace.add_backtrace reraise in |
