From 58767d7a26e9d72de1c01f8cf9a52a1afd454859 Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 19 Dec 2001 09:01:04 +0000 Subject: Le cas LetIn avait été oublié dans case_branches_specif MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2324 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/inductive.ml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'kernel') 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') -- cgit v1.2.3