diff options
| author | herbelin | 2000-10-11 20:10:10 +0000 |
|---|---|---|
| committer | herbelin | 2000-10-11 20:10:10 +0000 |
| commit | 487042107e8d7f3fd0350ade726e11d9ba4b6214 (patch) | |
| tree | 78a3c024d2d22cad15aff6914806ef3d4ec4f235 | |
| parent | b7e242c07c39f7dcdf4175c0e4eb3868a6b7aad8 (diff) | |
Renommage des find_m*type
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@698 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | pretyping/cases.ml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pretyping/cases.ml b/pretyping/cases.ml index 655a4903e8..9d536b644a 100644 --- a/pretyping/cases.ml +++ b/pretyping/cases.ml @@ -283,7 +283,6 @@ let substnl_tomatch v depth = function let subst_tomatch (depth,c) = substnl_tomatch [c] depth - (**********************************************************************) (* Dealing with regular and default patterns *) let is_regular eqn = eqn.tag = RegularPat @@ -762,12 +761,16 @@ let build_branch pb defaults eqns const_info = let submat = List.map (fun (tms,eqn) -> prepend_pattern tms eqn) eqns in if submat = [] & submatdef = [] then error "Non exhaustive"; let typs = List.map2 (fun (_,t) na -> (na,t)) cs_args (List.rev names) in + let _,typs' = + List.fold_right + (fun (na,t) (env,typs) -> + (push_rel_decl (na,outcast_type t) env, + ((na,to_mutind env !(pb.isevars) t),t)::typs)) + typs (pb.env,[]) in let tomatchs = List.fold_left2 - (fun l (na,t) dep_in_rhs -> - ((na,to_mutind pb.env !(pb.isevars) t), - (find_dependencies t l dep_in_rhs))::l) - [] typs (dependencies_in_rhs const_info.cs_nargs eqns) in + (fun l (d,t) dep_in_rhs -> (d,find_dependencies t l dep_in_rhs)::l) + [] typs' (dependencies_in_rhs const_info.cs_nargs eqns) in let topushs = List.map (fun x -> ToPush x) tomatchs in (* The dependent term to subst in the types of the remaining UnPushed terms is relative to the current context enriched by topushs *) |
