aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-12-19 09:01:04 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-12-19 09:01:04 +0000
commit58767d7a26e9d72de1c01f8cf9a52a1afd454859 (patch)
treee44ce65cb3225d0eb7e28d8aebc96aa0527c5107 /kernel
parentc975f79fd17181f4607a786e6f1444eef9fb5bb6 (diff)
Le cas LetIn avait été oublié dans case_branches_specif
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2324 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel')
-rw-r--r--kernel/inductive.ml10
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml
index 395ec95de..a905ce12a 100644
--- a/kernel/inductive.ml
+++ b/kernel/inductive.ml
@@ -380,6 +380,12 @@ let push_var_renv renv (x,ty) =
rel_min = renv.rel_min+1;
lst = map_lift_fst_n 1 renv.lst }
+let push_def_renv renv (x,b,ty) =
+ { renv with
+ env = push_rel (x,Some b,ty) renv.env;
+ rel_min = renv.rel_min+1;
+ lst = map_lift_fst_n 1 renv.lst }
+
let push_ctxt_renv renv ctxt =
let n = rel_context_length ctxt in
{ renv with
@@ -459,7 +465,7 @@ let case_branches_specif renv =
let rec crec renv lrec c =
let c' = strip_outer_cast c in
match lrec, kind_of_term c' with
- (ra::lr,Lambda (x,a,b)) ->
+ | (ra::lr,Lambda (x,a,b)) ->
let renv' =
match ra with
Mrec(i) -> add_recarg renv (x,a,renv.recvec.(i))
@@ -468,6 +474,8 @@ let case_branches_specif renv =
add_recarg renv (x,a,lc)
| _ -> push_var_renv renv (x,a) in
crec renv' lr b
+ | (_,LetIn (x,c,a,b)) ->
+ crec (push_def_renv renv (x,c,a)) lrec (subst1 c b)
(* Rq: if branch is not eta-long, then the recursive information
is not propagated: *)
| (_,_) -> (renv,c')