aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/constr.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2013-12-02 14:54:01 +0100
committerGravatar Matthieu Sozeau <mattam@mattam.org>2014-05-06 09:58:56 +0200
commitedb73502de9c3c51fb59e57747398e7fe5e391a6 (patch)
treec16fcf8ba8f57cff81d69078735a11505acef3f6 /kernel/constr.ml
parent12fd678c3cf163f76110b3b5edeb8a8bcfa82787 (diff)
Cleanup in constr, correct classification of polymorphic defs.
Diffstat (limited to 'kernel/constr.ml')
-rw-r--r--kernel/constr.ml23
1 files changed, 3 insertions, 20 deletions
diff --git a/kernel/constr.ml b/kernel/constr.ml
index 271691e02..4f2935be5 100644
--- a/kernel/constr.ml
+++ b/kernel/constr.ml
@@ -967,31 +967,14 @@ module Hsorts =
(Prop c1, Prop c2) -> c1 == c2
| (Type u1, Type u2) -> u1 == u2
|_ -> false
- let hash = Hashtbl.hash
+ let hash = function
+ | Prop Null -> 0 | Prop Pos -> 1
+ | Type u -> 2 + Universe.hash u
end)
let hcons_sorts = Hashcons.simple_hcons Hsorts.generate hcons_univ
let hcons_caseinfo = Hashcons.simple_hcons Hcaseinfo.generate hcons_ind
-let hcons_pconstruct (c,u as x) =
- let c' = hcons_construct c in
- if c' == c then x
- else (c', u)
-
-let hcons_pind (i,u as x) =
- let i' = hcons_ind i in
- if i' == i then x
- else i', u
-
-let hcons_pcon (c,u as x) =
- let c' = hcons_con c in
- if c' == c then x
- else c', u
-
-(* let hcons_pconstruct (c,u) = (hcons_construct c, Univ.Instance.hcons u) *)
-(* let hcons_pind (i,u) = (hcons_ind i, Univ.Instance.hcons u) *)
-(* let hcons_pcon (c,u) = (hcons_con c, Univ.Instance.hcons u) *)
-
let hcons =
hashcons
(Sorts.hcons,