aboutsummaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorherbelin2010-06-03 22:33:36 +0000
committerherbelin2010-06-03 22:33:36 +0000
commit238309bfddfa68f7a4982afa6a005a8110b0ffb1 (patch)
tree814866575d8236971377f7f07ef18a23335fb99b /parsing
parente75806ead6c7a45f804b057df90b2bc98b50259d (diff)
Added command "Locate Ltac qid".
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13067 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing')
-rw-r--r--parsing/g_vernac.ml43
-rw-r--r--parsing/ppvernac.ml7
2 files changed, 6 insertions, 4 deletions
diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4
index cbeb7a01eb..a422bed8e5 100644
--- a/parsing/g_vernac.ml4
+++ b/parsing/g_vernac.ml4
@@ -775,7 +775,8 @@ GEXTEND Gram
[ [ qid = smart_global -> LocateTerm qid
| IDENT "File"; f = ne_string -> LocateFile f
| IDENT "Library"; qid = global -> LocateLibrary qid
- | IDENT "Module"; qid = global -> LocateModule qid ] ]
+ | IDENT "Module"; qid = global -> LocateModule qid
+ | IDENT "Ltac"; qid = global -> LocateTactic qid ] ]
;
option_value:
[ [ n = integer -> IntValue n
diff --git a/parsing/ppvernac.ml b/parsing/ppvernac.ml
index 5d21d26d8a..dacc2b9b28 100644
--- a/parsing/ppvernac.ml
+++ b/parsing/ppvernac.ml
@@ -51,7 +51,7 @@ let pr_lname = function
let pr_smart_global = pr_or_by_notation pr_reference
-let pr_ltac_id = Libnames.pr_reference
+let pr_ltac_ref = Libnames.pr_reference
let pr_module = Libnames.pr_reference
@@ -814,7 +814,7 @@ let rec pr_vernac = function
match body with
| Tacexpr.TacFun (idl,b) -> idl,b
| _ -> [], body in
- pr_ltac_id id ++
+ pr_ltac_ref id ++
prlist (function None -> str " _"
| Some id -> spc () ++ pr_id id) idl
++ (if redef then str" ::=" else str" :=") ++ brk(1,1) ++
@@ -911,7 +911,7 @@ let rec pr_vernac = function
| PrintClasses -> str"Print Classes"
| PrintTypeClasses -> str"Print TypeClasses"
| PrintInstances qid -> str"Print Instances" ++ spc () ++ pr_smart_global qid
- | PrintLtac qid -> str"Print Ltac" ++ spc() ++ pr_reference qid
+ | PrintLtac qid -> str"Print Ltac" ++ spc() ++ pr_ltac_ref qid
| PrintCoercions -> str"Print Coercions"
| PrintCoercionPaths (s,t) -> str"Print Coercion Paths" ++ spc() ++ pr_class_rawexpr s ++ spc() ++ pr_class_rawexpr t
| PrintCanonicalConversions -> str"Print Canonical Structures"
@@ -943,6 +943,7 @@ let rec pr_vernac = function
| LocateFile f -> str"File" ++ spc() ++ qs f
| LocateLibrary qid -> str"Library" ++ spc () ++ pr_module qid
| LocateModule qid -> str"Module" ++ spc () ++ pr_module qid
+ | LocateTactic qid -> str"Ltac" ++ spc () ++ pr_ltac_ref qid
in str"Locate" ++ spc() ++ pr_locate loc
| VernacComments l ->
hov 2