aboutsummaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
Diffstat (limited to 'parsing')
-rw-r--r--parsing/g_constr.mlg10
-rw-r--r--parsing/g_prim.mlg7
-rw-r--r--parsing/pcoq.ml2
-rw-r--r--parsing/pcoq.mli4
-rw-r--r--parsing/ppextend.ml4
-rw-r--r--parsing/ppextend.mli2
6 files changed, 13 insertions, 16 deletions
diff --git a/parsing/g_constr.mlg b/parsing/g_constr.mlg
index 1ec83c496a..644493a010 100644
--- a/parsing/g_constr.mlg
+++ b/parsing/g_constr.mlg
@@ -154,7 +154,7 @@ GRAMMAR EXTEND Gram
| "10" LEFTA
[ f = operconstr; args = LIST1 appl_arg -> { CAst.make ~loc @@ CApp((None,f),args) }
| "@"; f = global; i = univ_instance; args = LIST0 NEXT -> { CAst.make ~loc @@ CAppExpl((None,f,i),args) }
- | "@"; lid = pattern_identref; args = LIST1 identref ->
+ | "@"; lid = pattern_ident; args = LIST1 identref ->
{ let { CAst.loc = locid; v = id } = lid in
let args = List.map (fun x -> CAst.make @@ CRef (qualid_of_ident ?loc:x.CAst.loc x.CAst.v, None), None) args in
CAst.make ~loc @@ CApp((None, CAst.make ?loc:locid @@ CPatVar id),args) } ]
@@ -252,7 +252,7 @@ GRAMMAR EXTEND Gram
| "cofix"; c = cofix_decls -> { let (id,dcls) = c in CAst.make ~loc @@ CCoFix (id,dcls) } ] ]
;
appl_arg:
- [ [ test_lpar_id_coloneq; "("; id = ident; ":="; c = lconstr; ")" -> { (c,Some (CAst.make ~loc @@ ExplByName id)) }
+ [ [ test_lpar_id_coloneq; "("; id = identref; ":="; c = lconstr; ")" -> { (c,Some (CAst.make ?loc:id.CAst.loc @@ ExplByName id.CAst.v)) }
| c=operconstr LEVEL "9" -> { (c,None) } ] ]
;
atomic_constr:
@@ -261,12 +261,12 @@ GRAMMAR EXTEND Gram
| n = NUMBER-> { CAst.make ~loc @@ CPrim (Numeral (NumTok.SPlus,n)) }
| s = string -> { CAst.make ~loc @@ CPrim (String s) }
| "_" -> { CAst.make ~loc @@ CHole (None, IntroAnonymous, None) }
- | "?"; "["; id = ident; "]" -> { CAst.make ~loc @@ CHole (None, IntroIdentifier id, None) }
- | "?"; "["; id = pattern_ident; "]" -> { CAst.make ~loc @@ CHole (None, IntroFresh id, None) }
+ | "?"; "["; id = identref; "]" -> { CAst.make ~loc @@ CHole (None, IntroIdentifier id.CAst.v, None) }
+ | "?"; "["; id = pattern_ident; "]" -> { CAst.make ~loc @@ CHole (None, IntroFresh id.CAst.v, None) }
| id = pattern_ident; inst = evar_instance -> { CAst.make ~loc @@ CEvar(id,inst) } ] ]
;
inst:
- [ [ id = ident; ":="; c = lconstr -> { (id,c) } ] ]
+ [ [ id = identref; ":="; c = lconstr -> { (id,c) } ] ]
;
evar_instance:
[ [ "@{"; l = LIST1 inst SEP ";"; "}" -> { l }
diff --git a/parsing/g_prim.mlg b/parsing/g_prim.mlg
index 270662b824..8069f049fd 100644
--- a/parsing/g_prim.mlg
+++ b/parsing/g_prim.mlg
@@ -47,7 +47,7 @@ GRAMMAR EXTEND Gram
GLOBAL:
bignat bigint natural integer identref name ident var preident
fullyqualid qualid reference dirpath ne_lstring
- ne_string string lstring pattern_ident pattern_identref by_notation
+ ne_string string lstring pattern_ident by_notation
smart_global bar_cbrace strategy_level;
preident:
[ [ s = IDENT -> { s } ] ]
@@ -56,10 +56,7 @@ GRAMMAR EXTEND Gram
[ [ s = IDENT -> { Id.of_string s } ] ]
;
pattern_ident:
- [ [ LEFTQMARK; id = ident -> { id } ] ]
- ;
- pattern_identref:
- [ [ id = pattern_ident -> { CAst.make ~loc id } ] ]
+ [ [ LEFTQMARK; id = ident -> { CAst.make ~loc id } ] ]
;
var: (* as identref, but interpret as a term identifier in ltac *)
[ [ id = ident -> { CAst.make ~loc id } ] ]
diff --git a/parsing/pcoq.ml b/parsing/pcoq.ml
index 723f08413e..fa7de40a30 100644
--- a/parsing/pcoq.ml
+++ b/parsing/pcoq.ml
@@ -286,7 +286,7 @@ module Prim =
let univ_decl = Entry.create "univ_decl"
let ident_decl = Entry.create "ident_decl"
let pattern_ident = Entry.create "pattern_ident"
- let pattern_identref = Entry.create "pattern_identref"
+ let pattern_identref = pattern_ident (* To remove in 8.14 *)
(* A synonym of ident - maybe ident will be located one day *)
let base_ident = Entry.create "base_ident"
diff --git a/parsing/pcoq.mli b/parsing/pcoq.mli
index ae9a7423c2..fa223367f7 100644
--- a/parsing/pcoq.mli
+++ b/parsing/pcoq.mli
@@ -156,8 +156,8 @@ module Prim :
val identref : lident Entry.t
val univ_decl : universe_decl_expr Entry.t
val ident_decl : ident_decl Entry.t
- val pattern_ident : Id.t Entry.t
- val pattern_identref : lident Entry.t
+ val pattern_ident : lident Entry.t
+ val pattern_identref : lident Entry.t [@@ocaml.deprecated "Use Prim.pattern_identref"]
val base_ident : Id.t Entry.t
val bignat : string Entry.t
val natural : int Entry.t
diff --git a/parsing/ppextend.ml b/parsing/ppextend.ml
index fe6e8360c1..aab385a707 100644
--- a/parsing/ppextend.ml
+++ b/parsing/ppextend.ml
@@ -17,7 +17,7 @@ open Constrexpr
(*s Pretty-print. *)
type ppbox =
- | PpHB of int
+ | PpHB
| PpHOVB of int
| PpHVB of int
| PpVB of int
@@ -27,7 +27,7 @@ type ppcut =
| PpFnl
let ppcmd_of_box = function
- | PpHB n -> h n
+ | PpHB -> h
| PpHOVB n -> hov n
| PpHVB n -> hv n
| PpVB n -> v n
diff --git a/parsing/ppextend.mli b/parsing/ppextend.mli
index ee8180c7aa..56a3fc8e3c 100644
--- a/parsing/ppextend.mli
+++ b/parsing/ppextend.mli
@@ -13,7 +13,7 @@ open Constrexpr
(** {6 Pretty-print. } *)
type ppbox =
- | PpHB of int
+ | PpHB
| PpHOVB of int
| PpHVB of int
| PpVB of int