From 72029c8b00126f92c8f8e8d73e6c27b0b0a8b685 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Thu, 25 Jul 2019 13:51:51 +0200 Subject: Mark primitives integer as able to participate in reductions (fixes #10560). The documentation states: - Norm means the term is fully normalized and cannot create a redex when substituted - Cstr means the term is in head normal form and that it can create a redex when substituted (i.e. constructor, fix, lambda) --- kernel/cClosure.ml | 2 +- test-suite/bugs/closed/bug_10560.v | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 test-suite/bugs/closed/bug_10560.v diff --git a/kernel/cClosure.ml b/kernel/cClosure.ml index 1cc3dc3975..3fd613e905 100644 --- a/kernel/cClosure.ml +++ b/kernel/cClosure.ml @@ -1075,7 +1075,7 @@ module FNativeEntries = let mkInt env i = check_int env; - { mark = mark Norm KnownR; term = FInt i } + { mark = mark Cstr KnownR; term = FInt i } let mkBool env b = check_bool env; diff --git a/test-suite/bugs/closed/bug_10560.v b/test-suite/bugs/closed/bug_10560.v new file mode 100644 index 0000000000..a9a0949d9a --- /dev/null +++ b/test-suite/bugs/closed/bug_10560.v @@ -0,0 +1,9 @@ +From Coq Require Import Int63. +Open Scope int63_scope. + +Lemma foo : + let n := opp 0 in add n 0 = n. +Proof. +cbv. +apply eq_refl. +Qed. -- cgit v1.2.3