aboutsummaryrefslogtreecommitdiff
path: root/pretyping/reductionops.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-05-04 13:30:00 +0200
committerPierre-Marie Pédrot2016-05-04 13:33:08 +0200
commita6de02fcfde76f49b10d8481a2423692fa105756 (patch)
tree344a2e7114b8cb9cc0e54d8d801b4f7cdf5d6d7b /pretyping/reductionops.ml
parentc81228e693dea839f648ddc95f7cedec22d6a47a (diff)
parent174fd1f853f47d24b350a53e7f186ab37829dc2a (diff)
Merge branch 'v8.5'
Diffstat (limited to 'pretyping/reductionops.ml')
-rw-r--r--pretyping/reductionops.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/pretyping/reductionops.ml b/pretyping/reductionops.ml
index 7f4249c5b6..b6eb3a0379 100644
--- a/pretyping/reductionops.ml
+++ b/pretyping/reductionops.ml
@@ -810,7 +810,7 @@ let rec whd_state_gen ?csts tactic_mode flags env sigma =
let fold () =
let () = if !debug_RAKAM then
let open Pp in pp (str "<><><><><>" ++ fnl ()) in
- if tactic_mode then (Stack.best_state s cst_l,Cst_stack.empty) else (s,cst_l)
+ (s,cst_l)
in
match kind_of_term x with
| Rel n when Closure.RedFlags.red_set flags Closure.RedFlags.fDELTA ->
@@ -1001,7 +1001,9 @@ let rec whd_state_gen ?csts tactic_mode flags env sigma =
| Rel _ | Var _ | Const _ | LetIn _ | Proj _ -> fold ()
| Sort _ | Ind _ | Prod _ -> fold ()
in
- whrec (Option.default Cst_stack.empty csts)
+ fun xs ->
+ let (s,cst_l as res) = whrec (Option.default Cst_stack.empty csts) xs in
+ if tactic_mode then (Stack.best_state s cst_l,Cst_stack.empty) else res
(** reduction machine without global env and refold machinery *)
let local_whd_state_gen flags sigma =