aboutsummaryrefslogtreecommitdiff
path: root/kernel/environ.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-09-22 11:04:21 +0200
committerPierre-Marie Pédrot2020-10-21 12:18:01 +0200
commit8f16b1c5b97411b7ea88279699f0f410f1c77723 (patch)
treea2b6f1867f55330164d7cdb2e048f0f197e63f30 /kernel/environ.ml
parent3f0b70956add7b5731052c485cec972372b0eff9 (diff)
Introduce a dummy name quotient API.
For now it does not do anything but eventually it should be used to replace the reliance on canonical names for dual kerpairs such as e.g. constants and inductive types.
Diffstat (limited to 'kernel/environ.ml')
-rw-r--r--kernel/environ.ml33
1 files changed, 33 insertions, 0 deletions
diff --git a/kernel/environ.ml b/kernel/environ.ml
index dec9e1deb8..ac7775b89c 100644
--- a/kernel/environ.ml
+++ b/kernel/environ.ml
@@ -832,3 +832,36 @@ let set_retroknowledge env r = { env with retroknowledge = r }
let set_native_symbols env native_symbols = { env with native_symbols }
let add_native_symbols dir syms env =
{ env with native_symbols = DPmap.add dir syms env.native_symbols }
+
+module QConstant =
+struct
+ type t = Constant.t
+ let equal _env c1 c2 = Constant.CanOrd.equal c1 c2
+ let compare _env c1 c2 = Constant.CanOrd.compare c1 c2
+ let hash _env c = Constant.CanOrd.hash c
+ let canonical _env c = (Constant.canonical c)
+end
+
+module QMutInd =
+struct
+ type t = MutInd.t
+ let equal _env c1 c2 = MutInd.CanOrd.equal c1 c2
+ let compare _env c1 c2 = MutInd.CanOrd.compare c1 c2
+ let hash _env c = MutInd.CanOrd.hash c
+ let canonical _env c = (MutInd.canonical c)
+end
+
+module QProjection =
+struct
+ type t = Projection.t
+ let equal _env c1 c2 = Projection.CanOrd.equal c1 c2
+ let compare _env c1 c2 = Projection.CanOrd.compare c1 c2
+ let hash _env c = Projection.CanOrd.hash c
+ module Repr =
+ struct
+ type t = Projection.Repr.t
+ let equal _env c1 c2 = Projection.Repr.CanOrd.equal c1 c2
+ let compare _env c1 c2 = Projection.Repr.CanOrd.compare c1 c2
+ let hash _env c = Projection.Repr.CanOrd.hash c
+ end
+end