diff options
| author | herbelin | 2002-06-03 10:28:40 +0000 |
|---|---|---|
| committer | herbelin | 2002-06-03 10:28:40 +0000 |
| commit | e860dcf1df4d7042aa872ba4ad914d1d64d574cf (patch) | |
| tree | ccaea77ed45e472307e5b3c9023aebfbb0d6dff9 /parsing | |
| parent | 3eb35bf30c52aad878867650a233744b7028a62d (diff) | |
Intgration uniforme de coercions dans les dclarations (Variable and co) et retouche des Record
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2747 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing')
| -rw-r--r-- | parsing/g_vernac.ml4 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4 index caa3b79161..86e7629aa8 100644 --- a/parsing/g_vernac.ml4 +++ b/parsing/g_vernac.ml4 @@ -125,8 +125,14 @@ GEXTEND Gram | IDENT "Variables" -> AssumptionVariable | IDENT "Parameters" -> AssumptionParameter ] ] ; + of_type_with_opt_coercion: + [ [ ":>" -> true + | ":"; ">" -> true + | ":" -> false ] ] + ; params: - [ [ idl = LIST1 ident SEP ","; ":"; c = constr -> join_binders (idl,c) + [ [ idl = LIST1 ident SEP ","; coe = of_type_with_opt_coercion; c = constr + -> List.map (fun c -> (coe,c)) (join_binders (idl,c)) ] ] ; ne_params_list: @@ -186,7 +192,7 @@ GEXTEND Gram ; constructor: [ [ id = ident; coe = of_type_with_opt_coercion; c = constr -> - (id,coe,c) ] ] + (coe,(id,c)) ] ] ; ne_constructor_list: [ [ idc = constructor; "|"; l = ne_constructor_list -> idc :: l @@ -285,7 +291,7 @@ GEXTEND Gram VernacInductive (f,indl') | record_token; oc = opt_coercion; name = ident; ps = indpar; ":"; s = sort; ":="; c = rec_constructor; "{"; fs = fields; "}" -> - VernacRecord (oc,name,ps,s,c,fs) + VernacRecord ((oc,name),ps,s,c,fs) ] ] ; gallina: |
