src/Pure/search.ML
changeset 5754 98744e38ded1
parent 5693 998af7667fa3
child 5956 ab4d13e9e77a
     1.1 --- a/src/Pure/search.ML	Fri Oct 23 20:28:33 1998 +0200
     1.2 +++ b/src/Pure/search.ML	Fri Oct 23 20:34:59 1998 +0200
     1.3 @@ -23,6 +23,7 @@
     1.4  
     1.5    val has_fewer_prems	: int -> thm -> bool   
     1.6    val IF_UNSOLVED	: tactic -> tactic
     1.7 +  val SOLVE		: tactic -> tactic
     1.8    val trace_BEST_FIRST	: bool ref
     1.9    val BEST_FIRST	: (thm -> bool) * (thm -> int) -> tactic -> tactic
    1.10    val THEN_BEST_FIRST	: tactic -> (thm->bool) * (thm->int) -> tactic
    1.11 @@ -65,6 +66,9 @@
    1.12  (*Apply a tactic if subgoals remain, else do nothing.*)
    1.13  val IF_UNSOLVED = COND (has_fewer_prems 1) all_tac;
    1.14  
    1.15 +(*Force a tactic to solve its goal completely, otherwise fail *)
    1.16 +fun SOLVE tac = tac THEN COND (has_fewer_prems 1) all_tac no_tac;
    1.17 +
    1.18  (*Execute tac1, but only execute tac2 if there are at least as many subgoals
    1.19    as before.  This ensures that tac2 is only applied to an outcome of tac1.*)
    1.20  fun (tac1 THEN_MAYBE tac2) st =