aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs
diff options
context:
space:
mode:
authorGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-01-30 18:17:13 +0000
committerGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-01-30 18:17:13 +0000
commitf1c54f39609fd2e13fb339a6a94f9f500f7af3a5 (patch)
tree9ccb296cce573b392bd6e33d7fa6fcbc70fed615 /proofs
parent47e9afaaa4c08aca97d4f4b5a89cb40da76bd850 (diff)
Added an pattern / occurence syntax for vm_compute.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14950 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs')
-rw-r--r--proofs/redexpr.ml11
1 files changed, 10 insertions, 1 deletions
diff --git a/proofs/redexpr.ml b/proofs/redexpr.ml
index 0430a239e..10e1e66cb 100644
--- a/proofs/redexpr.ml
+++ b/proofs/redexpr.ml
@@ -191,7 +191,16 @@ let rec reduction_of_red_expr = function
(try reduction_of_red_expr (Stringmap.find s !red_expr_tab)
with Not_found ->
error("unknown user-defined reduction \""^s^"\"")))
- | CbvVm -> (cbv_vm ,VMcast)
+ | CbvVm (Some lp) ->
+ let b = is_reference (snd lp) in
+ let lp = out_with_occurrences lp in
+ let vmfun _ env map c =
+ let tpe = Retyping.get_type_of env map c in
+ Vnorm.cbv_vm env c tpe
+ in
+ let redfun = contextually b lp vmfun in
+ (redfun, VMcast)
+ | CbvVm None -> (cbv_vm, VMcast)
let subst_flags subs flags =