non-strict "Quiet" mode, to avoid odd crash of code_pred/after_qed due to ill-typed use of string_of_clause (e.g. in JinjaThreads/Common/Decl.thy of AFP/d1bb08f92ce5);
authorwenzelm
Wed, 17 Jul 2013 14:33:33 +0200
changeset 52685 554d684d8520
parent 52684 8d749ebd9ab8
child 52686 f4871fe80410
non-strict "Quiet" mode, to avoid odd crash of code_pred/after_qed due to ill-typed use of string_of_clause (e.g. in JinjaThreads/Common/Decl.thy of AFP/d1bb08f92ce5);
src/HOL/Tools/case_translation.ML
--- a/src/HOL/Tools/case_translation.ML	Wed Jul 17 13:45:55 2013 +0200
+++ b/src/HOL/Tools/case_translation.ML	Wed Jul 17 14:33:33 2013 +0200
@@ -384,9 +384,11 @@
       (case subtract (op =) tags (map (snd o snd) rows) of
         [] => ()
       | is =>
-          (case config of Error => case_error | Warning => warning | Quiet => fn _ => ())
-            ("The following clauses are redundant (covered by preceding clauses):\n" ^
-              cat_lines (map (string_of_clause o nth clauses) is)));
+          if config = Quiet then ()
+          else
+            (if config = Error then case_error else warning)
+              ("The following clauses are redundant (covered by preceding clauses):\n" ^
+                cat_lines (map (string_of_clause o nth clauses) is)));
   in
     case_tm
   end;