aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorletouzey2010-06-04 10:10:00 +0000
committerletouzey2010-06-04 10:10:00 +0000
commitf4f00814df08b79045408dd98e7872c17c0c55b8 (patch)
tree70857fbbd312d95c5072e404ef5aff0b5a14ab0c
parentd72bcdf45bcd026a613838caebc209200ee2153f (diff)
A new command Compute foo, shortcut for Eval vm_compute in foo
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13070 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--doc/refman/RefMan-oth.tex8
-rw-r--r--parsing/g_vernac.ml42
2 files changed, 10 insertions, 0 deletions
diff --git a/doc/refman/RefMan-oth.tex b/doc/refman/RefMan-oth.tex
index b765ef7d4f..f664163366 100644
--- a/doc/refman/RefMan-oth.tex
+++ b/doc/refman/RefMan-oth.tex
@@ -67,6 +67,14 @@ progress).
\SeeAlso Section~\ref{Conversion-tactics}.
+\subsection[\tt Compute {\term}.]{\tt Compute {\term}.\comindex{Compute}}
+
+This command performs a call-by-value evaluation of {\term} by using
+the bytecode-based virtual machine. It is a shortcut for
+{\tt Eval vm\_compute in {\term}}.
+
+\SeeAlso Section~\ref{Conversion-tactics}.
+
\subsection[\tt Extraction \term.]{\tt Extraction \term.\label{ExtractionTerm}
\comindex{Extraction}}
This command displays the extracted term from
diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4
index a422bed8e5..789bb6810e 100644
--- a/parsing/g_vernac.ml4
+++ b/parsing/g_vernac.ml4
@@ -726,6 +726,8 @@ GEXTEND Gram
check_command: (* TODO: rapprocher Eval et Check *)
[ [ IDENT "Eval"; r = Tactic.red_expr; "in"; c = lconstr ->
fun g -> VernacCheckMayEval (Some r, g, c)
+ | IDENT "Compute"; c = lconstr ->
+ fun g -> VernacCheckMayEval (Some Rawterm.CbvVm, g, c)
| IDENT "Check"; c = lconstr ->
fun g -> VernacCheckMayEval (None, g, c) ] ]
;