aboutsummaryrefslogtreecommitdiff
path: root/pretyping
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
parentc81228e693dea839f648ddc95f7cedec22d6a47a (diff)
parent174fd1f853f47d24b350a53e7f186ab37829dc2a (diff)
Merge branch 'v8.5'
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/indrec.ml2
-rw-r--r--pretyping/reductionops.ml6
2 files changed, 5 insertions, 3 deletions
diff --git a/pretyping/indrec.ml b/pretyping/indrec.ml
index 713c99597a..8b061e3c2a 100644
--- a/pretyping/indrec.ml
+++ b/pretyping/indrec.ml
@@ -592,7 +592,7 @@ let make_elimination_ident id s = add_suffix id (elimination_suffix s)
let lookup_eliminator ind_sp s =
let kn,i = ind_sp in
- let mp,dp,l = repr_mind kn in
+ let mp,dp,l = KerName.repr (MutInd.canonical kn) in
let ind_id = (Global.lookup_mind kn).mind_packets.(i).mind_typename in
let id = add_suffix ind_id (elimination_suffix s) in
(* Try first to get an eliminator defined in the same section as the *)
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 =