From 8309a98096facfba448c9d8d298ba3903145831a Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Thu, 15 Jan 2015 18:45:27 +0530 Subject: 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. --- kernel/vars.ml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kernel/vars.ml') diff --git a/kernel/vars.ml b/kernel/vars.ml index 1685817a3..88c1e1038 100644 --- a/kernel/vars.ml +++ b/kernel/vars.ml @@ -336,3 +336,6 @@ let subst_instance_constr subst c = let subst_instance_context s ctx = if Univ.Instance.is_empty s then ctx else map_rel_context (fun x -> subst_instance_constr s x) ctx + +type id_key = pconstant tableKey +let eq_id_key x y = Names.eq_table_key (Univ.eq_puniverses Constant.equal) x y -- cgit v1.2.3