diff options
| author | letouzey | 2013-10-23 22:17:11 +0000 |
|---|---|---|
| committer | letouzey | 2013-10-23 22:17:11 +0000 |
| commit | ef42739eadeb6ec3fc98b5beaa13bd859de44d15 (patch) | |
| tree | d0db75605b1ff04fe13f70f0a02aacbee7465cf0 /pretyping | |
| parent | 5e6145c871eea1e94566b252b4bfc4cd752f42d5 (diff) | |
cList.index is now cList.index_f, same for index0
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16921 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping')
| -rw-r--r-- | pretyping/detyping.ml | 5 | ||||
| -rw-r--r-- | pretyping/matching.ml | 2 | ||||
| -rw-r--r-- | pretyping/patternops.ml | 7 | ||||
| -rw-r--r-- | pretyping/tacred.ml | 2 |
4 files changed, 10 insertions, 6 deletions
diff --git a/pretyping/detyping.ml b/pretyping/detyping.ml index 7ab2a27cab..bdbfe412e7 100644 --- a/pretyping/detyping.ml +++ b/pretyping/detyping.ml @@ -219,7 +219,7 @@ let lookup_index_as_renamed env t n = let update_name na ((_,e),c) = match na with - | Name _ when force_wildcard () && noccurn (List.index na e) c -> + | Name _ when force_wildcard () && noccurn (List.index Name.equal na e) c -> Anonymous | _ -> na @@ -249,7 +249,8 @@ and align_tree nal isgoal (e,c as rhs) = match nal with | [] -> [[],rhs] | na::nal -> match kind_of_term c with - | Case (ci,p,c,cl) when eq_constr c (mkRel (List.index na (snd e))) + | Case (ci,p,c,cl) when + eq_constr c (mkRel (List.index Name.equal na (snd e))) && (* don't contract if p dependent *) computable p (ci.ci_pp_info.ind_nargs) -> let clauses = build_tree na isgoal e ci cl in diff --git a/pretyping/matching.ml b/pretyping/matching.ml index 16a9c8a32c..8e77de9c54 100644 --- a/pretyping/matching.ml +++ b/pretyping/matching.ml @@ -112,7 +112,7 @@ let dummy_constr = mkProp let make_renaming ids = function | (Name id, Name _, _) -> begin - try mkRel (List.index id ids) + try mkRel (List.index Id.equal id ids) with Not_found -> dummy_constr end | _ -> dummy_constr diff --git a/pretyping/patternops.ml b/pretyping/patternops.ml index 329af85266..79e3913a91 100644 --- a/pretyping/patternops.ml +++ b/pretyping/patternops.ml @@ -206,7 +206,10 @@ let instantiate_pattern sigma lvar c = let ctx,c = Id.Map.find id lvar in try let inst = - List.map (fun id -> mkRel (List.index (Name id) vars)) ctx in + List.map + (fun id -> mkRel (List.index Name.equal (Name id) vars)) + ctx + in let c = substl inst c in snd (pattern_of_constr sigma c) with Not_found (* List.index failed *) -> @@ -301,7 +304,7 @@ let err loc pp = user_err_loc (loc,"pattern_of_glob_constr", pp) let rec pat_of_raw metas vars = function | GVar (_,id) -> - (try PRel (List.index (Name id) vars) + (try PRel (List.index Name.equal (Name id) vars) with Not_found -> PVar id) | GPatVar (_,(false,n)) -> metas := n::!metas; PMeta (Some n) diff --git a/pretyping/tacred.ml b/pretyping/tacred.ml index 6e64e3fa65..1db40e8db0 100644 --- a/pretyping/tacred.ml +++ b/pretyping/tacred.ml @@ -329,7 +329,7 @@ let make_elim_fun (names,(nbfix,lv,n)) largs = let la = List.map_i (fun q aq -> (* k from the comment is q+1 *) - try mkRel (p+1-(List.index (n-q) lyi)) + try mkRel (p+1-(List.index Int.equal (n-q) lyi)) with Not_found -> aq) 0 (List.map (lift p) lu) in |
