aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/vm.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2015-01-15 18:45:27 +0530
committerGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2015-01-15 18:59:00 +0530
commit8309a98096facfba448c9d8d298ba3903145831a (patch)
tree38a09851cb687921193b4368a93eed34ccd55a58 /kernel/vm.ml
parent58153a5bc59bbde6534425d66a2fe5d9943eb44b (diff)
Correct restriction of vm_compute when handling universe polymorphic
definitions. Instead of failing with an anomaly when trying to do conversion or computation with the vm's, consider polymorphic constants as being opaque and keep instances around. This way the code is still correct but (obviously) incomplete for polymorphic definitions and we avoid introducing an anomaly. The patch does nothing clever, it only keeps around instances with constants/inductives and compile constant bodies only for non-polymorphic definitions.
Diffstat (limited to 'kernel/vm.ml')
-rw-r--r--kernel/vm.ml13
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/vm.ml b/kernel/vm.ml
index a7e5a55c4..2cc1efe43 100644
--- a/kernel/vm.ml
+++ b/kernel/vm.ml
@@ -137,10 +137,11 @@ type vswitch = {
(* Generally the first field is a code pointer. *)
(* Do not edit this type without editing C code, especially "coq_values.h" *)
+
type atom =
- | Aid of id_key
- | Aiddef of id_key * values
- | Aind of inductive
+ | Aid of Vars.id_key
+ | Aiddef of Vars.id_key * values
+ | Aind of pinductive
(* Zippers *)
@@ -306,11 +307,11 @@ let val_of_atom a = val_of_obj (obj_of_atom a)
module IdKeyHash =
struct
- type t = id_key
- let equal = Names.eq_id_key
+ type t = pconstant tableKey
+ let equal = Names.eq_table_key (Univ.eq_puniverses Constant.equal)
open Hashset.Combine
let hash = function
- | ConstKey c -> combinesmall 1 (Constant.hash c)
+ | ConstKey (c,u) -> combinesmall 1 (Constant.hash c)
| VarKey id -> combinesmall 2 (Id.hash id)
| RelKey i -> combinesmall 3 (Int.hash i)
end