aboutsummaryrefslogtreecommitdiffhomepage
path: root/parsing/ppvernac.ml
diff options
context:
space:
mode:
authorGravatar vsiles <vsiles@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-09-28 09:59:12 +0000
committerGravatar vsiles <vsiles@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-09-28 09:59:12 +0000
commit104471118454580c3ca4b2a3cce52a03263e5d15 (patch)
tree0af98148e169638789c3d97f3c38ecef73492a24 /parsing/ppvernac.ml
parent3d0f2b7ecfb78308bbb17d135fcceefd121f7624 (diff)
Modification of the Scheme command.
Now you can forget to provide the name of the scheme, it will be built automatically depending of the sorts involved. e.g. Scheme Induction for nat Sort Set. will build nat_rec git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10148 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing/ppvernac.ml')
-rw-r--r--parsing/ppvernac.ml12
1 files changed, 9 insertions, 3 deletions
diff --git a/parsing/ppvernac.ml b/parsing/ppvernac.ml
index d44e225b5..4bb7d2752 100644
--- a/parsing/ppvernac.ml
+++ b/parsing/ppvernac.ml
@@ -279,15 +279,21 @@ let pr_binders_arg =
let pr_and_type_binders_arg bl =
pr_binders_arg bl
-let pr_onescheme (id,schem) =
+let pr_onescheme (idop,schem) =
match schem with
| InductionScheme (dep,ind,s) ->
- hov 0 (pr_lident id ++ str" :=") ++ spc() ++
+ (match idop with
+ | Some id -> hov 0 (pr_lident id ++ str" :=") ++ spc()
+ | None -> spc ()
+ ) ++
hov 0 ((if dep then str"Induction for" else str"Minimality for")
++ spc() ++ pr_reference ind) ++ spc() ++
hov 0 (str"Sort" ++ spc() ++ pr_rawsort s)
| EqualityScheme ind ->
- hov 0 (pr_lident id ++ str" :=") ++ spc() ++
+ (match idop with
+ | Some id -> hov 0 (pr_lident id ++ str" :=") ++ spc()
+ | None -> spc()
+ ) ++
hov 0 (str"Equality for")
++ spc() ++ pr_reference ind