aboutsummaryrefslogtreecommitdiffhomepage
path: root/printing/printmod.ml
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-03-13 00:00:04 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-03-13 00:00:04 +0000
commit108e88cafee662932c99a83230f674f648866613 (patch)
tree949ee9b405efe3c5d70a3efc2d51ff997a159b81 /printing/printmod.ml
parent027618d5aa99613ffbe390371cda492690809cc7 (diff)
Restrict (try...with...) to avoid catching critical exn (part 5)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16281 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'printing/printmod.ml')
-rw-r--r--printing/printmod.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/printing/printmod.ml b/printing/printmod.ml
index 57d990b86..fd9b1f200 100644
--- a/printing/printmod.ml
+++ b/printing/printmod.ml
@@ -127,7 +127,7 @@ let print_body is_impl env mp (l,body) =
try
let env = Option.get env in
Printer.pr_mutual_inductive_body env (MutInd.make2 mp l) mib
- with _ ->
+ with e when Errors.noncritical e ->
(if mib.mind_finite then str "Inductive " else str "CoInductive")
++ name)
@@ -135,7 +135,7 @@ let print_struct is_impl env mp struc =
begin
(* If [mp] is a globally visible module, we simply import it *)
try Declaremods.really_import_module mp
- with _ ->
+ with Not_found ->
(* Otherwise we try to emulate an import by playing with nametab *)
let fp = nametab_register_dir mp in
List.iter (nametab_register_body mp fp) struc