aboutsummaryrefslogtreecommitdiff
path: root/pretyping/vnorm.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2018-07-23 17:59:30 +0200
committerPierre-Marie Pédrot2018-07-24 14:43:31 +0200
commit2ff9efcf617318fdfec9966cf3690d1fc4e56da7 (patch)
treec350fe3b3004bc37335da704efce2f83cb0f5ddd /pretyping/vnorm.ml
parentcb15de5ec1a8a9092a2d44fde9f98a642b9330a6 (diff)
Fix #8119: anomalies in vm_compute with let and evars.
There were actually two broken things with VM + evars, the fixes are: - Do not pass let-bound arguments to evars. - Use the right order for evar arguments. Native compilation seems to be suffering from the same shortcomings, I will open a separate bug and adapt the PR.
Diffstat (limited to 'pretyping/vnorm.ml')
-rw-r--r--pretyping/vnorm.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/pretyping/vnorm.ml b/pretyping/vnorm.ml
index c944080503..255707dc7b 100644
--- a/pretyping/vnorm.ml
+++ b/pretyping/vnorm.ml
@@ -209,6 +209,9 @@ and nf_evar env sigma evk stk =
| Zapp args :: stk ->
(** We assume that there is no consecutive Zapp nodes in a VM stack. Is that
really an invariant? *)
+ (** Let-bound arguments are present in the evar arguments but not in the
+ type, so we turn the let into a product. *)
+ let hyps = Context.Named.drop_bodies hyps in
let fold accu d = Term.mkNamedProd_or_LetIn d accu in
let t = List.fold_left fold concl hyps in
let t, args = nf_args env sigma args t in