From b820ff40cb8053df01ac422f36d5f3520727b5c6 Mon Sep 17 00:00:00 2001 From: herbelin Date: Fri, 19 Dec 2003 18:20:53 +0000 Subject: Substitution dans REvar et PEvar plutot que encodage via noeud application pour eviter la confusion avec la (vraie) application git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5114 85f007b7-540e-0410-9357-904b9bb8a0f7 --- pretyping/pattern.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'pretyping/pattern.ml') diff --git a/pretyping/pattern.ml b/pretyping/pattern.ml index f453e911e..f5c3b2c03 100644 --- a/pretyping/pattern.ml +++ b/pretyping/pattern.ml @@ -34,7 +34,7 @@ let patvar_of_int_v7 n = Names.id_of_string ("?" ^ string_of_int n) type constr_pattern = | PRef of global_reference | PVar of identifier - | PEvar of existential_key + | PEvar of existential_key * constr_pattern array | PRel of int | PApp of constr_pattern * constr_pattern array | PSoApp of patvar * constr_pattern list @@ -176,9 +176,7 @@ let rec pattern_of_constr t = | Const sp -> PRef (ConstRef sp) | Ind sp -> PRef (IndRef sp) | Construct sp -> PRef (ConstructRef sp) - | Evar (n,ctxt) -> - if ctxt = [||] then PEvar n - else PApp (PEvar n, Array.map pattern_of_constr ctxt) + | Evar (n,ctxt) -> PEvar (n,Array.map pattern_of_constr ctxt) | Case (ci,p,a,br) -> PCase ((Some ci.ci_ind,ci.ci_pp_info.style), Some (pattern_of_constr p),pattern_of_constr a, -- cgit v1.2.3