aboutsummaryrefslogtreecommitdiff
path: root/proofs
diff options
context:
space:
mode:
authorcoq2002-10-01 07:53:07 +0000
committercoq2002-10-01 07:53:07 +0000
commit02f6cb08e4b8f892594934766a40413a3fa30342 (patch)
tree6c8e85d78ffbad43aa579ec3612cb93b14f1b4b2 /proofs
parente6afa737d4bcc1c7973cd46094e824b875fede11 (diff)
Vraie substitutivite de autohints
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3055 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs')
-rw-r--r--proofs/clenv.ml14
-rw-r--r--proofs/clenv.mli3
2 files changed, 17 insertions, 0 deletions
diff --git a/proofs/clenv.ml b/proofs/clenv.ml
index 44c5aafb08..1a527cbeaa 100644
--- a/proofs/clenv.ml
+++ b/proofs/clenv.ml
@@ -377,6 +377,20 @@ let mk_clenv_from_n wc n (c,cty) =
let mk_clenv_from wc = mk_clenv_from_n wc None
+let map_fl f cfl = { cfl with rebus=f cfl.rebus }
+
+let map_clb f = function
+ | Cltyp cfl -> Cltyp (map_fl f cfl)
+ | Clval (cfl1,cfl2) -> Clval (map_fl f cfl1,map_fl f cfl2)
+
+let subst_clenv f sub clenv =
+ { templval = map_fl (subst_mps sub) clenv.templval;
+ templtyp = map_fl (subst_mps sub) clenv.templtyp;
+ namenv = clenv.namenv;
+ env = Intmap.map (map_clb (subst_mps sub)) clenv.env;
+ hook = f sub clenv.hook }
+
+
let connect_clenv wc clenv =
{ templval = clenv.templval;
templtyp = clenv.templtyp;
diff --git a/proofs/clenv.mli b/proofs/clenv.mli
index 54334c45a0..efd8dc302c 100644
--- a/proofs/clenv.mli
+++ b/proofs/clenv.mli
@@ -67,6 +67,9 @@ val mk_clenv_rename_from_n : wc -> int option -> constr * constr -> wc clausenv
val mk_clenv_hnf_constr_type_of : wc -> constr -> wc clausenv
val mk_clenv_type_of : wc -> constr -> wc clausenv
+val subst_clenv : (substitution -> 'a -> 'a) ->
+ substitution -> 'a clausenv -> 'a clausenv
+
val connect_clenv : wc -> 'a clausenv -> wc clausenv
val clenv_change_head : constr * constr -> 'a clausenv -> 'a clausenv
val clenv_assign : int -> constr -> 'a clausenv -> 'a clausenv