diff options
| author | herbelin | 2008-08-05 10:14:37 +0000 |
|---|---|---|
| committer | herbelin | 2008-08-05 10:14:37 +0000 |
| commit | 2dd11f7fb059a23f15d1a9dec1354edd55a15726 (patch) | |
| tree | 167e9bf175de405d2a3c4e9eeca3d87c3e3f2da4 /pretyping/reductionops.ml | |
| parent | ff0a77ae90f39c56e82126978a59d957676e0d9e (diff) | |
Suite 11187 et 11298 : ne retarder le dépliage d'une projection
canonique que si elle contribue vraiment à une équation canonique,
c'est-à-dire si son argument principal est une evar; sinon on
répercute le comportement historique qui est de préférer le dépliage
du côté droit d'une équation constante/constante.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11303 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping/reductionops.ml')
| -rw-r--r-- | pretyping/reductionops.ml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pretyping/reductionops.ml b/pretyping/reductionops.ml index 12594dd6d7..99c57d084c 100644 --- a/pretyping/reductionops.ml +++ b/pretyping/reductionops.ml @@ -518,9 +518,11 @@ let whd_eta c = app_stack (local_whd_state_gen eta (c,empty_stack)) (* Replacing defined evars for error messages *) let rec whd_evar sigma c = match kind_of_term c with - | Evar (ev,args) - when Evd.mem sigma ev & Evd.is_defined sigma ev -> - whd_evar sigma (Evd.existential_value sigma (ev,args)) + | Evar ev -> + let d = + try Some (Evd.existential_value sigma ev) + with NotInstantiatedEvar | Not_found -> None in + (match d with Some c -> whd_evar sigma c | None -> c) | Sort s when is_sort_variable sigma s -> whd_sort_variable sigma c | _ -> collapse_appl c |
