diff options
author | 2011-12-16 15:09:07 +0000 | |
---|---|---|
committer | 2011-12-16 15:09:07 +0000 | |
commit | 6c21af13a66a8fd829979476205e32df9e8c0f49 (patch) | |
tree | 9f3634f39cbeeefff29877db39a353b63c598bc5 /pretyping/cases.ml | |
parent | ec60cad947dc4267f0545626b4ec7145f19f3ee3 (diff) |
Introducing a notion of evar candidates to be used when an evar is
known in advance to be instantiable by only a finite number of terms.
When an evar with candidates remain unsolved after unification, the
first candidate is taken as a heuristic.
This is used in particular to reduce the number of pending conversion
problems when trying to infer the return clause of a pattern-matching
problem. As an example, this repairs test 2615.v.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14797 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping/cases.ml')
-rw-r--r-- | pretyping/cases.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pretyping/cases.ml b/pretyping/cases.ml index 77007b0ba..8963ea5ea 100644 --- a/pretyping/cases.ml +++ b/pretyping/cases.ml @@ -1489,9 +1489,9 @@ let abstract_tycon loc env evdref subst _tycon extenv t = List.map (fun (id,_,_) -> dependent (mkVar id) u) (named_context extenv) in let filter = rel_filter@named_filter in + let candidates = u :: List.map mkRel vl in let ev = - e_new_evar evdref extenv ~src:(loc, CasesType) ~filter:filter ty in - evdref := add_conv_pb (Reduction.CONV,extenv,substl inst ev,u) !evdref; + e_new_evar evdref extenv ~src:(loc, CasesType) ~filter ~candidates ty in lift k ev else map_constr_with_full_binders push_binder aux x t in |