aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2000-10-01 13:18:45 +0000
committerherbelin2000-10-01 13:18:45 +0000
commitafdb9b7fa4a6ce1165b270ffdae4574897aa7c40 (patch)
tree8b68749df9982ccb270c3cdcc2324de075c052e3
parent402679a57beec382cf90cbcddfc00d3f702cba74 (diff)
Déplacement 'a reference et binder_kind de Term vers Rawterm
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@619 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--parsing/pattern.ml6
-rw-r--r--parsing/pattern.mli4
-rw-r--r--pretyping/rawterm.ml9
-rw-r--r--pretyping/rawterm.mli9
-rw-r--r--tactics/termdn.ml1
5 files changed, 22 insertions, 7 deletions
diff --git a/parsing/pattern.ml b/parsing/pattern.ml
index 2d989fafc6..27511b9715 100644
--- a/parsing/pattern.ml
+++ b/parsing/pattern.ml
@@ -17,10 +17,6 @@ type constr_pattern =
| PSort of rawsort
| PMeta of int option
| PCase of constr_pattern option * constr_pattern * constr_pattern array
-(*i
- | Prec of loc * fix_kind * identifier array *
- constr_pattern array * constr_pattern array
-i*)
let rec occur_meta_pattern = function
| PApp (f,args) ->
@@ -123,7 +119,7 @@ let eq_context ctxt1 ctxt2 = array_for_all2 eq_constr ctxt1 ctxt2
let matches_core convert pat c =
let rec sorec stk sigma p t =
- let cT = whd_castapp t in
+ let cT = strip_outer_cast t in
match p,kind_of_term cT with
| PSoApp (n,args),m ->
let relargs =
diff --git a/parsing/pattern.mli b/parsing/pattern.mli
index 5506e070d4..ba8a883a8a 100644
--- a/parsing/pattern.mli
+++ b/parsing/pattern.mli
@@ -9,11 +9,11 @@ open Environ
(*i*)
type constr_pattern =
- | PRef of constr array reference
+ | PRef of constr array Rawterm.reference
| PRel of int
| PApp of constr_pattern * constr_pattern array
| PSoApp of int * constr_pattern list
- | PBinder of binder_kind * name * constr_pattern * constr_pattern
+ | PBinder of Rawterm.binder_kind * name * constr_pattern * constr_pattern
| PSort of Rawterm.rawsort
| PMeta of int option
| PCase of constr_pattern option * constr_pattern * constr_pattern array
diff --git a/pretyping/rawterm.ml b/pretyping/rawterm.ml
index a3382f5cdf..294cbe320c 100644
--- a/pretyping/rawterm.ml
+++ b/pretyping/rawterm.ml
@@ -21,6 +21,15 @@ type cases_pattern =
type rawsort = RProp of Term.contents | RType
+type binder_kind = BProd | BLambda | BLetIn
+
+type 'ctxt reference =
+ | RConst of section_path * 'ctxt
+ | RInd of inductive_path * 'ctxt
+ | RConstruct of constructor_path * 'ctxt
+ | RVar of identifier
+ | REVar of int * 'ctxt
+
(*i Pas beau ce constr dans rawconstr, mais mal compris ce ctxt des ref i*)
type rawconstr =
| RRef of loc * rawconstr array reference
diff --git a/pretyping/rawterm.mli b/pretyping/rawterm.mli
index 5fb28fea03..4ee516b8b3 100644
--- a/pretyping/rawterm.mli
+++ b/pretyping/rawterm.mli
@@ -20,6 +20,15 @@ type cases_pattern =
type rawsort = RProp of Term.contents | RType
+type binder_kind = BProd | BLambda | BLetIn
+
+type 'ctxt reference =
+ | RConst of section_path * 'ctxt
+ | RInd of inductive_path * 'ctxt
+ | RConstruct of constructor_path * 'ctxt
+ | RVar of identifier
+ | REVar of int * 'ctxt
+
type rawconstr =
| RRef of loc * rawconstr array reference
| RMeta of loc * int
diff --git a/tactics/termdn.ml b/tactics/termdn.ml
index c62746cc71..1837b7945e 100644
--- a/tactics/termdn.ml
+++ b/tactics/termdn.ml
@@ -6,6 +6,7 @@ open Util
open Names
open Term
open Pattern
+open Rawterm
(* Discrimination nets of terms.
See the module dn.ml for further explanations.