aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/esubst.mli
diff options
context:
space:
mode:
authorGravatar puech <puech@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-08-08 08:46:34 +0000
committerGravatar puech <puech@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-08-08 08:46:34 +0000
commit59462251fec623636b3a5396253e38f6d29bf747 (patch)
treec23d7dff6718ce6e2211e719485f284f3bc8dd00 /kernel/esubst.mli
parentca6b6bfde9a0c5b91a53e9c139140403369ff658 (diff)
Esubst: make types of substitutions & lifts private
Allows to be sure that we apply the smart constructors. Propagate the change to Closure, Reduction, Term, Cbv and Newring git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14386 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/esubst.mli')
-rw-r--r--kernel/esubst.mli6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/esubst.mli b/kernel/esubst.mli
index e605fa212..fe978261e 100644
--- a/kernel/esubst.mli
+++ b/kernel/esubst.mli
@@ -16,13 +16,14 @@
- SHIFT(n,S) = (^n o S) terms in S are relocated with n vars
- LIFT(n,S) = (%n S) stands for ((^n o S).n...1)
(corresponds to S crossing n binders) *)
-type 'a subs =
+type 'a subs = private
| ESID of int
| CONS of 'a array * 'a subs
| SHIFT of int * 'a subs
| LIFT of int * 'a subs
(** Derived constructors granting basic invariants *)
+val subs_id : int -> 'a subs
val subs_cons: 'a array * 'a subs -> 'a subs
val subs_shft: int * 'a subs -> 'a subs
val subs_lift: 'a subs -> 'a subs
@@ -54,11 +55,12 @@ val comp : ('a subs * 'a -> 'a) -> 'a subs -> 'a subs -> 'a subs
(** Compact representation of explicit relocations
- [ELSHFT(l,n)] == lift of [n], then apply [lift l].
- [ELLFT(n,l)] == apply [l] to de Bruijn > [n] i.e under n binders. *)
-type lift =
+type lift = private
| ELID
| ELSHFT of lift * int
| ELLFT of int * lift
+val el_id : lift
val el_shft : int -> lift -> lift
val el_liftn : int -> lift -> lift
val el_lift : lift -> lift