aboutsummaryrefslogtreecommitdiff
path: root/proofs/pattern.ml
diff options
context:
space:
mode:
authorherbelin2000-04-30 00:53:51 +0000
committerherbelin2000-04-30 00:53:51 +0000
commite867509591c1e8fad3fd764da652deb28d293d49 (patch)
tree020f62a4157a5b13ac8de4fcd6229f34e1971064 /proofs/pattern.ml
parentde22ca2b88c8350f1f9e1e2b261c42844aea4367 (diff)
Suite intégration de constr_pattern
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@393 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs/pattern.ml')
-rw-r--r--proofs/pattern.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/proofs/pattern.ml b/proofs/pattern.ml
index 56a9db7f28..14a1a8905a 100644
--- a/proofs/pattern.ml
+++ b/proofs/pattern.ml
@@ -12,7 +12,7 @@ type constr_pattern =
| PRef of Term.constr array reference
| PRel of int
| PApp of constr_pattern * constr_pattern array
- | PSoApp of int * constr list
+ | PSoApp of int * constr_pattern list
| PBinder of binder_kind * name * constr_pattern * constr_pattern
| PLet of identifier * constr_pattern * constr_pattern * constr_pattern
| PSort of rawsort
@@ -126,7 +126,7 @@ let eq_context ctxt1 ctxt2 = array_for_all2 eq_constr ctxt1 ctxt2
exception PatternMatchingFailure
-let matches_core convert =
+let matches_core convert pat c =
let rec sorec stk sigma p t =
let cT = whd_castapp t in
match p,kind_of_term cT with
@@ -134,7 +134,7 @@ let matches_core convert =
let relargs =
List.map
(function
- | Rel n -> n
+ | PRel n -> n
| _ -> error "Only bound indices are currently allowed in second order pattern matching")
args in
let frels = Intset.elements (free_rels cT) in
@@ -195,8 +195,8 @@ let matches_core convert =
| _ -> raise PatternMatchingFailure
- in
- sorec [] []
+ in
+ Sort.list (fun (a,_) (b,_) -> a<b) (sorec [] [] pat c)
let matches = matches_core None