aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/reduction.ml
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-06-03 22:41:28 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-06-03 22:41:28 +0000
commit3f96c12fc3108b3b66f78b3288d29ef26da98ed8 (patch)
tree9b016a0799eb891a3f761c63b7ab3349f9dfb5a3 /kernel/reduction.ml
parent238309bfddfa68f7a4982afa6a005a8110b0ffb1 (diff)
"Improved" the form of the inferred type of "match" by
betaiota-reducing it automatically (this allows for instance to directly obtain the expected type for "match" expressions that have a "in I x return match x with ... end" automatically inferred return predicate feature (see e.g. Vhead and Vtail in Bvector.v). The need for this "optimization" was not noticed in V8.2 because in Bvector.v, betaiota was applied peremptorily at the end of sections. The need for it has been revealed by the removal of reduction at section closing when Arnaud introduced the new proof engine (should in particular make CoLoR compile). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13068 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/reduction.ml')
-rw-r--r--kernel/reduction.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/reduction.ml b/kernel/reduction.ml
index e215f2336..e8fea8280 100644
--- a/kernel/reduction.ml
+++ b/kernel/reduction.ml
@@ -94,6 +94,9 @@ let pure_stack lfts stk =
(* Reduction Functions *)
(****************************************************************************)
+let whd_betaiota t =
+ whd_val (create_clos_infos betaiota empty_env) (inject t)
+
let nf_betaiota t =
norm_val (create_clos_infos betaiota empty_env) (inject t)