diff options
| author | Matthieu Sozeau | 2013-12-02 14:54:01 +0100 |
|---|---|---|
| committer | Matthieu Sozeau | 2014-05-06 09:58:56 +0200 |
| commit | edb73502de9c3c51fb59e57747398e7fe5e391a6 (patch) | |
| tree | c16fcf8ba8f57cff81d69078735a11505acef3f6 /kernel | |
| parent | 12fd678c3cf163f76110b3b5edeb8a8bcfa82787 (diff) | |
Cleanup in constr, correct classification of polymorphic defs.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/constr.ml | 23 | ||||
| -rw-r--r-- | kernel/univ.ml | 13 |
2 files changed, 9 insertions, 27 deletions
diff --git a/kernel/constr.ml b/kernel/constr.ml index 271691e029..4f2935be51 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, diff --git a/kernel/univ.ml b/kernel/univ.ml index 2b512d76f1..3d66b01cf5 100644 --- a/kernel/univ.ml +++ b/kernel/univ.ml @@ -397,7 +397,7 @@ struct include H - let pool = WH.create 491 + let pool = WH.create 4910 let make x = try @@ -466,12 +466,8 @@ module Level = struct module Hunivlevelhash = MakeHashedHashcons(Hunivlevel) include Hunivlevelhash - let hcons = make - - let make m n = hcons (Hunivlevel.make (Level (n, Names.DirPath.hcons m))) - - let set = hcons (Hunivlevel.make Set) - let prop = hcons (Hunivlevel.make Prop) + let set = make (Hunivlevel.make Set) + let prop = make (Hunivlevel.make Prop) let is_small x = match data x with @@ -529,6 +525,9 @@ module Level = struct | Prop, Set | Set, Prop -> true | _ -> false + + let make m n = make (Hunivlevel.make (Level (n, Names.DirPath.hcons m))) + end let pr_universe_level_list l = |
