aboutsummaryrefslogtreecommitdiff
path: root/interp/notation.ml
diff options
context:
space:
mode:
authorJason Gross2019-03-31 14:33:55 -0400
committerJason Gross2019-04-01 11:08:54 -0400
commitb0f8e09c3212fa96934817e7ca99465cd634f57c (patch)
tree645e8114a3e86de4fd9d833523d87e6d20ceebb5 /interp/notation.ml
parent606aa700cc258ceb01abbead42d38ef2e31ad6cd (diff)
[interp] [numeral] Use cbv rather than vm
It is important to fully normalize the term, *including inductive parameters of constructors*; see https://github.com/coq/coq/issues/9840 for details on what goes wrong if this does not happen, e.g., from using the vm rather than cbv. Supersedes / closes #9655
Diffstat (limited to 'interp/notation.ml')
-rw-r--r--interp/notation.ml14
1 files changed, 6 insertions, 8 deletions
diff --git a/interp/notation.ml b/interp/notation.ml
index bc68d97bb8..cdc2594454 100644
--- a/interp/notation.ml
+++ b/interp/notation.ml
@@ -606,20 +606,18 @@ module PrimTokenNotation = struct
At least [c] is known to be evar-free, since it comes from
our own ad-hoc [constr_of_glob] or from conversions such
as [coqint_of_rawnum].
-*)
-let eval_constr env sigma (c : Constr.t) =
- let c = EConstr.of_constr c in
- let sigma,t = Typing.type_of env sigma c in
- let c' = Vnorm.cbv_vm env sigma c t in
- EConstr.Unsafe.to_constr c'
+ It is important to fully normalize the term, *including inductive
+ parameters of constructors*; see
+ https://github.com/coq/coq/issues/9840 for details on what goes
+ wrong if this does not happen, e.g., from using the vm rather than
+ cbv.
+*)
-(* For testing with "compute" instead of "vm_compute" :
let eval_constr env sigma (c : Constr.t) =
let c = EConstr.of_constr c in
let c' = Tacred.compute env sigma c in
EConstr.Unsafe.to_constr c'
-*)
let eval_constr_app env sigma c1 c2 =
eval_constr env sigma (mkApp (c1,[| c2 |]))