diff options
Diffstat (limited to 'kernel/inductive.ml')
-rw-r--r-- | kernel/inductive.ml | 10 |
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') |