made tactic more robust in case somebody specified a discriminator for a one-constructor type
--- a/src/HOL/BNF/Tools/bnf_ctr_sugar_tactics.ML Thu Sep 26 13:56:07 2013 +0200
+++ b/src/HOL/BNF/Tools/bnf_ctr_sugar_tactics.ML Thu Sep 26 15:13:28 2013 +0200
@@ -65,8 +65,8 @@
val mk_disc_exhaust_tac = mk_disc_or_sel_exhaust_tac;
fun mk_sel_exhaust_tac n disc_exhaust collapses =
- if n = 1 then HEADGOAL (etac meta_mp THEN' resolve_tac collapses)
- else mk_disc_or_sel_exhaust_tac n disc_exhaust collapses;
+ mk_disc_or_sel_exhaust_tac n disc_exhaust collapses ORELSE
+ HEADGOAL (etac meta_mp THEN' resolve_tac collapses);
fun mk_collapse_tac ctxt m discD sels =
HEADGOAL (dtac discD THEN'