aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tactics/refine.ml9
1 files changed, 6 insertions, 3 deletions
diff --git a/tactics/refine.ml b/tactics/refine.ml
index db89ec6e2e..e36859cc3a 100644
--- a/tactics/refine.ml
+++ b/tactics/refine.ml
@@ -263,9 +263,12 @@ let rec compute_metamap env sigma c = match kind_of_term c with
let ensure_products n =
let p = ref 0 in
- let rec aux n =
- if n = 0 then tclFAIL 0 (mt())
- else tclORELSE intro (fun gl -> incr p; tclTHEN introf (aux (n-1)) gl) in
+ let rec aux n gl =
+ if n = 0 then tclFAIL 0 (mt()) gl
+ else
+ tclTHEN
+ (tclORELSE intro (fun gl -> incr p; introf gl))
+ (aux (n-1)) gl in
tclORELSE
(aux n)
(* Now we know how many red are needed *)