aboutsummaryrefslogtreecommitdiff
path: root/parsing/ppvernac.ml
diff options
context:
space:
mode:
authormsozeau2008-03-06 14:56:08 +0000
committermsozeau2008-03-06 14:56:08 +0000
commit07ffd30a82ebfe35811ca43d71aeacdb86f4cc87 (patch)
tree079a8c517c979db931d576d606a47e75627318c6 /parsing/ppvernac.ml
parent6f3400ed7f6aa2810d72f803273f04a7add04207 (diff)
Syntax changes in typeclasses, remove "?" for usual implicit arguments
binding, add "!" syntax for the new binders which require parameters and not superclasses. Change backquotes for curly braces for user-given implicit arguments, following tradition. This requires a hack a la lpar-id-coloneq. Change ident to global for typeclass names in class binders. Also requires a similar hack to distinguish between [ C t1 tn ] and [ c : C t1 tn ]. Update affected theories. While hacking the parsing of { wf }, factorized the two versions of fix annotation parsing that were present in g_constr and g_vernac. Add the possibility of the user optionaly giving the priority for resolve and exact hints (used by type classes). Syntax not fixed yet: a natural after the list of lemmas in "Hint Resolve" syntax, a natural after a "|" after the instance constraint in Instance declarations (ex in Morphisms.v). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10628 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing/ppvernac.ml')
-rw-r--r--parsing/ppvernac.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/parsing/ppvernac.ml b/parsing/ppvernac.ml
index 0daccbba53..92d56e078d 100644
--- a/parsing/ppvernac.ml
+++ b/parsing/ppvernac.ml
@@ -191,7 +191,10 @@ let pr_hints local db h pr_c pr_pat =
let pph =
match h with
| HintsResolve l ->
- str "Resolve " ++ prlist_with_sep sep pr_c l
+ str "Resolve " ++ prlist_with_sep sep
+ (fun (pri, c) -> pr_c c ++
+ match pri with Some x -> spc () ++ str"(" ++ int x ++ str")" | None -> mt ())
+ l
| HintsImmediate l ->
str"Immediate" ++ spc() ++ prlist_with_sep sep pr_c l
| HintsUnfold l ->
@@ -703,7 +706,7 @@ let rec pr_vernac = function
prlist_with_sep (fun () -> str";" ++ spc())
(fun (lid,oc,c) -> pr_lident_constr ((if oc then str" :>" else str" :") ++ spc()) (lid,c)) props )
- | VernacInstance (sup, (instid, bk, cl), props) ->
+ | VernacInstance (sup, (instid, bk, cl), props, pri) ->
hov 1 (
str"Instance" ++ spc () ++
pr_and_type_binders_arg sup ++