aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/environ.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/environ.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/environ.ml')
-rw-r--r--kernel/environ.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/environ.ml b/kernel/environ.ml
index 8b1e49919..0ebff440a 100644
--- a/kernel/environ.ml
+++ b/kernel/environ.ml
@@ -594,7 +594,7 @@ let dispatch =
let int31_op n op prim kn =
{ empty_reactive_info with
vm_compiling = Some (Cbytegen.op_compilation n op kn);
- native_compiling = Some (Nativelambda.compile_prim prim kn);
+ native_compiling = Some (Nativelambda.compile_prim prim (Univ.out_punivs kn));
}
in
@@ -602,7 +602,7 @@ fun rk value field ->
(* subfunction which shortens the (very common) dispatch of operations *)
let int31_op_from_const n op prim =
match kind_of_term value with
- | Const (kn,_) -> int31_op n op prim kn
+ | Const kn -> int31_op n op prim kn
| _ -> anomaly ~label:"Environ.register" (Pp.str "should be a constant")
in
let int31_binop_from_const op prim = int31_op_from_const 2 op prim in