From 4552729b88058946055dddde1533057e25bfc5a9 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Wed, 16 May 2018 00:06:51 +0200 Subject: Unify pre_env and env We now have only two notions of environments in the kernel: env and safe_env. --- kernel/nativelambda.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/nativelambda.ml') diff --git a/kernel/nativelambda.ml b/kernel/nativelambda.ml index 12cd5fe83a..a49bf62b3d 100644 --- a/kernel/nativelambda.ml +++ b/kernel/nativelambda.ml @@ -12,7 +12,7 @@ open Names open Esubst open Constr open Declarations -open Pre_env +open Environ open Nativevalues open Nativeinstr -- cgit v1.2.3 From 442bd1fe4007d2f3b46cb565abbcd64011db1af4 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Wed, 16 May 2018 00:36:08 +0200 Subject: Fix #7333: vm_compute segfaults / Anomaly with cofix We eta-expand cofixpoints when needed, so that their call-by-need evaluation is correctly implemented by VM and native_compute. --- kernel/nativelambda.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'kernel/nativelambda.ml') diff --git a/kernel/nativelambda.ml b/kernel/nativelambda.ml index a49bf62b3d..8b61ed0c5a 100644 --- a/kernel/nativelambda.ml +++ b/kernel/nativelambda.ml @@ -570,6 +570,7 @@ let rec lambda_of_constr env sigma c = Lfix(rec_init, (names, ltypes, lbodies)) | CoFix(init,(names,type_bodies,rec_bodies)) -> + let rec_bodies = Array.map2 (Reduction.eta_expand !global_env) rec_bodies type_bodies in let ltypes = lambda_of_args env sigma 0 type_bodies in Renv.push_rels env names; let lbodies = lambda_of_args env sigma 0 rec_bodies in -- cgit v1.2.3