Skip to content

Commit ef62022

Browse files
committed
Remove deprecated commands Arguments Scope and Implicit Arguments
1 parent 0fa8b8c commit ef62022

File tree

6 files changed

+2
-67
lines changed

6 files changed

+2
-67
lines changed

intf/vernacexpr.ml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,17 +409,13 @@ type nonrec vernac_expr =
409409
| VernacHints of string list * hints_expr
410410
| VernacSyntacticDefinition of lident * (Id.t list * constr_expr) *
411411
onlyparsing_flag
412-
| VernacDeclareImplicits of reference or_by_notation *
413-
(explicitation * bool * bool) list list
414412
| VernacArguments of reference or_by_notation *
415413
vernac_argument_status list (* Main arguments status list *) *
416414
(Name.t * vernac_implicit_status) list list (* Extra implicit status lists *) *
417415
int option (* Number of args to trigger reduction *) *
418416
[ `ReductionDontExposeCase | `ReductionNeverUnfold | `Rename |
419417
`ExtraScopes | `Assert | `ClearImplicits | `ClearScopes |
420418
`DefaultImplicits ] list
421-
| VernacArgumentsScope of reference or_by_notation *
422-
scope_name option list
423419
| VernacReserve of simple_binder list
424420
| VernacGeneralizable of (lident list) option
425421
| VernacSetOpacity of (Conv_oracle.level * reference or_by_notation list)

parsing/g_vernac.ml4

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -601,14 +601,6 @@ GEXTEND Gram
601601
;
602602
END
603603

604-
let warn_deprecated_arguments_scope =
605-
CWarnings.create ~name:"deprecated-arguments-scope" ~category:"deprecated"
606-
(fun () -> strbrk "Arguments Scope is deprecated; use Arguments instead")
607-
608-
let warn_deprecated_implicit_arguments =
609-
CWarnings.create ~name:"deprecated-implicit-arguments" ~category:"deprecated"
610-
(fun () -> strbrk "Implicit Arguments is deprecated; use Arguments instead")
611-
612604
(* Extensions: implicits, coercions, etc. *)
613605
GEXTEND Gram
614606
GLOBAL: gallina_ext instance_name hint_info;
@@ -691,20 +683,6 @@ GEXTEND Gram
691683
let more_implicits = Option.default [] more_implicits in
692684
VernacArguments (qid, args, more_implicits, !slash_position, mods)
693685

694-
695-
(* moved there so that camlp5 factors it with the previous rule *)
696-
| IDENT "Arguments"; IDENT "Scope"; qid = smart_global;
697-
"["; scl = LIST0 [ "_" -> None | sc = IDENT -> Some sc ]; "]" ->
698-
warn_deprecated_arguments_scope ~loc:!@loc ();
699-
VernacArgumentsScope (qid,scl)
700-
701-
(* Implicit *)
702-
| IDENT "Implicit"; IDENT "Arguments"; qid = smart_global;
703-
pos = LIST0 [ "["; l = LIST0 implicit_name; "]" ->
704-
List.map (fun (id,b,f) -> (ExplByName id,b,f)) l ] ->
705-
warn_deprecated_implicit_arguments ~loc:!@loc ();
706-
VernacDeclareImplicits (qid,pos)
707-
708686
| IDENT "Implicit"; "Type"; bl = reserv_list ->
709687
VernacReserve bl
710688

@@ -734,12 +712,6 @@ GEXTEND Gram
734712
[`ClearImplicits; `ClearScopes]
735713
] ]
736714
;
737-
implicit_name:
738-
[ [ "!"; id = ident -> (id, false, true)
739-
| id = ident -> (id,false,false)
740-
| "["; "!"; id = ident; "]" -> (id,true,true)
741-
| "["; id = ident; "]" -> (id,true, false) ] ]
742-
;
743715
scope:
744716
[ [ "%"; key = IDENT -> key ] ]
745717
;

printing/ppvernac.ml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,6 @@ open Decl_kinds
155155

156156
let pr_locality local = if local then keyword "Local" else keyword "Global"
157157

158-
let pr_explanation (e,b,f) =
159-
let a = match e with
160-
| ExplByPos (n,_) -> anomaly (Pp.str "No more supported.")
161-
| ExplByName id -> pr_id id in
162-
let a = if f then str"!" ++ a else a in
163-
if b then str "[" ++ a ++ str "]" else a
164-
165158
let pr_option_ref_value = function
166159
| QualidRefValue id -> pr_reference id
167160
| StringRefValue s -> qs s
@@ -653,16 +646,6 @@ open Decl_kinds
653646
keyword "Bind Scope" ++ spc () ++ str sc ++
654647
spc() ++ keyword "with" ++ spc () ++ prlist_with_sep spc pr_class_rawexpr cll
655648
)
656-
| VernacArgumentsScope (q,scl) ->
657-
let pr_opt_scope = function
658-
| None -> str"_"
659-
| Some sc -> str sc
660-
in
661-
return (
662-
keyword "Arguments Scope"
663-
++ spc() ++ pr_smart_global q
664-
++ spc() ++ str"[" ++ prlist_with_sep sep pr_opt_scope scl ++ str"]"
665-
)
666649
| VernacInfix (({v=s},mv),q,sn) -> (* A Verifier *)
667650
return (
668651
hov 0 (hov 0 (keyword "Infix "
@@ -1016,18 +999,6 @@ open Decl_kinds
1016999
| Some Flags.Current -> [SetOnlyParsing]
10171000
| Some v -> [SetCompatVersion v]))
10181001
)
1019-
| VernacDeclareImplicits (q,[]) ->
1020-
return (
1021-
hov 2 (keyword "Implicit Arguments" ++ spc() ++ pr_smart_global q)
1022-
)
1023-
| VernacDeclareImplicits (q,impls) ->
1024-
return (
1025-
hov 1 (keyword "Implicit Arguments" ++ spc () ++
1026-
spc() ++ pr_smart_global q ++ spc() ++
1027-
prlist_with_sep spc (fun imps ->
1028-
str"[" ++ prlist_with_sep sep pr_explanation imps ++ str"]")
1029-
impls)
1030-
)
10311002
| VernacArguments (q, args, more_implicits, nargs, mods) ->
10321003
return (
10331004
hov 2 (

stm/vernac_classifier.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ let classify_vernac e =
145145
| VernacAddLoadPath _ | VernacRemoveLoadPath _ | VernacAddMLPath _
146146
| VernacChdir _
147147
| VernacCreateHintDb _ | VernacRemoveHints _ | VernacHints _
148-
| VernacDeclareImplicits _ | VernacArguments _ | VernacArgumentsScope _
148+
| VernacArguments _
149149
| VernacReserve _
150150
| VernacGeneralizable _
151151
| VernacSetOpacity _ | VernacSetStrategy _

tools/gallina-syntax.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@
432432
("Add Semi Ring" nil "Add Semi Ring #." t "Add\\s-+Semi\\s-+Ring")
433433
("Add Setoid" nil "Add Setoid #." t "Add\\s-+Setoid")
434434
("Admit Obligations" "oblsadmit" "Admit Obligations." nil "Admit\\s-+Obligations")
435-
("Arguments Scope" "argsc" "Arguments Scope @{id} [ @{_} ]" t "Arguments\\s-+Scope")
436435
("Bind Scope" "bndsc" "Bind Scope @{scope} with @{type}" t "Bind\\s-+Scope")
437436
("Canonical Structure" nil "Canonical Structure #." t "Canonical\\s-+Structure")
438437
("Cd" nil "Cd #." nil "Cd")

vernac/vernacentries.ml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,7 +2025,6 @@ let interp ?proof ~atts ~st c =
20252025
| VernacDelimiters (sc,lr) -> vernac_delimiters sc lr
20262026
| VernacBindScope (sc,rl) -> vernac_bind_scope sc rl
20272027
| VernacOpenCloseScope (b, s) -> vernac_open_close_scope ~atts (b,s)
2028-
| VernacArgumentsScope (qid,scl) -> vernac_arguments_scope ~atts qid scl
20292028
| VernacInfix (mv,qid,sc) -> vernac_infix ~atts mv qid sc
20302029
| VernacNotation (c,infpl,sc) ->
20312030
vernac_notation ~atts c infpl sc
@@ -2099,8 +2098,6 @@ let interp ?proof ~atts ~st c =
20992098
vernac_hints ~atts dbnames hints
21002099
| VernacSyntacticDefinition (id,c,b) ->
21012100
vernac_syntactic_definition ~atts id c b
2102-
| VernacDeclareImplicits (qid,l) ->
2103-
vernac_declare_implicits ~atts qid l
21042101
| VernacArguments (qid, args, more_implicits, nargs, flags) ->
21052102
vernac_arguments ~atts qid args more_implicits nargs flags
21062103
| VernacReserve bl -> vernac_reserve bl
@@ -2168,7 +2165,7 @@ let check_vernac_supports_locality c l =
21682165
| VernacDeclareMLModule _
21692166
| VernacCreateHintDb _ | VernacRemoveHints _ | VernacHints _
21702167
| VernacSyntacticDefinition _
2171-
| VernacArgumentsScope _ | VernacDeclareImplicits _ | VernacArguments _
2168+
| VernacArguments _
21722169
| VernacGeneralizable _
21732170
| VernacSetOpacity _ | VernacSetStrategy _
21742171
| VernacSetOption _ | VernacUnsetOption _

0 commit comments

Comments
 (0)