From d8f3bf3416dc3ca6e5719b47451b0f72d663d7e2 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 29 Nov 2013 10:23:38 +0100 Subject: Fixing bug #3169 and avoiding anomaly in bug #2885 (vm_compute not supporting metas/evars). Fix of #3169 is by calling pretyping retyper rather than the non evar-aware kernel type-checker (since argument of vm_compute is supposed to be already typable). Support of metas/evars in vm is still to be done... --- proofs/redexpr.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'proofs/redexpr.ml') diff --git a/proofs/redexpr.ml b/proofs/redexpr.ml index 69ff1dc51..f71ec440e 100644 --- a/proofs/redexpr.ml +++ b/proofs/redexpr.ml @@ -23,8 +23,10 @@ open Libobject open Misctypes (* call by value normalisation function using the virtual machine *) -let cbv_vm env _ c = - let ctyp = (fst (Typeops.infer env c)).Environ.uj_type in +let cbv_vm env sigma c = + let ctyp = Retyping.get_type_of env sigma c in + if Termops.occur_meta_or_existential c then + error "vm_compute does not support existential variables."; Vnorm.cbv_vm env c ctyp let cbv_native env _ c = -- cgit v1.2.3