@@ -135,7 +135,7 @@ let init_scope_map () =
135
135
(* Operations on scopes *)
136
136
137
137
let warn_undeclared_scope =
138
- CWarnings. create ~name: " undeclared-scope" ~category: " deprecated"
138
+ CWarnings. create ~name: " undeclared-scope" ~category: CWarnings.CoreCategories. deprecated
139
139
(fun (scope ) ->
140
140
strbrk " Declaring a scope implicitly is deprecated; use in advance an explicit "
141
141
++ str " \" Declare Scope " ++ str scope ++ str " .\" ." )
@@ -685,15 +685,15 @@ module Numbers = struct
685
685
open PrimTokenNotation
686
686
687
687
let warn_large_num =
688
- CWarnings. create ~name: " large-number" ~category: " numbers"
688
+ CWarnings. create ~name: " large-number" ~category: CWarnings.CoreCategories. numbers
689
689
(fun ty ->
690
690
strbrk " Stack overflow or segmentation fault happens when " ++
691
691
strbrk " working with large numbers in " ++ pr_qualid ty ++
692
692
strbrk " (threshold may vary depending" ++
693
693
strbrk " on your system limits and on the command executed)." )
694
694
695
695
let warn_abstract_large_num =
696
- CWarnings. create ~name: " abstract-large-number" ~category: " numbers"
696
+ CWarnings. create ~name: " abstract-large-number" ~category: CWarnings.CoreCategories. numbers
697
697
(fun (ty ,f ) ->
698
698
strbrk " To avoid stack overflow, large numbers in " ++
699
699
pr_qualid ty ++ strbrk " are interpreted as applications of " ++
@@ -909,7 +909,7 @@ let interp_int63 ?loc esig ind n =
909
909
else error_overflow ?loc n
910
910
911
911
let warn_inexact_float =
912
- CWarnings. create ~name: " inexact-float" ~category: " parsing"
912
+ CWarnings. create ~name: " inexact-float" ~category: CWarnings.CoreCategories. parsing
913
913
(fun (sn , f ) ->
914
914
Pp. strbrk
915
915
(Printf. sprintf
@@ -1335,26 +1335,30 @@ let pr_optional_scope = function
1335
1335
| LastLonelyNotation -> mt ()
1336
1336
| NotationInScope scope -> spc () ++ strbrk " in scope" ++ spc () ++ str scope
1337
1337
1338
+ let w_nota_overridden =
1339
+ CWarnings. create_warning
1340
+ ~from: [CWarnings.CoreCategories. parsing] ~name: " notation-overridden" ()
1341
+
1338
1342
let warn_notation_overridden =
1339
- CWarnings. create ~name: " notation-overridden " ~category: " parsing "
1340
- (fun (scope ,ntn ) ->
1341
- str " Notation" ++ spc () ++ pr_notation ntn ++ spc ()
1342
- ++ strbrk " was already used" ++ pr_optional_scope scope ++ str " ." )
1343
+ CWarnings. create_in w_nota_overridden
1344
+ (fun (scope ,ntn ) ->
1345
+ str " Notation" ++ spc () ++ pr_notation ntn ++ spc ()
1346
+ ++ strbrk " was already used" ++ pr_optional_scope scope ++ str " ." )
1343
1347
1344
1348
let warn_deprecation_overridden =
1345
- CWarnings. create ~name: " notation-overridden " ~category: " parsing "
1346
- (fun ((scope ,ntn ),old ,now ) ->
1347
- match old, now with
1348
- | None , None -> assert false
1349
- | None , Some _ ->
1350
- (str " Notation" ++ spc () ++ pr_notation ntn ++ pr_optional_scope scope ++ spc ()
1351
- ++ strbrk " is now marked as deprecated" ++ str " ." )
1352
- | Some _ , None ->
1353
- (str " Cancelling previous deprecation of notation" ++ spc () ++
1354
- pr_notation ntn ++ pr_optional_scope scope ++ str " ." )
1355
- | Some _ , Some _ ->
1356
- (str " Amending deprecation of notation" ++ spc () ++
1357
- pr_notation ntn ++ pr_optional_scope scope ++ str " ." ))
1349
+ CWarnings. create_in w_nota_overridden
1350
+ (fun ((scope ,ntn ),old ,now ) ->
1351
+ match old, now with
1352
+ | None , None -> assert false
1353
+ | None , Some _ ->
1354
+ (str " Notation" ++ spc () ++ pr_notation ntn ++ pr_optional_scope scope ++ spc ()
1355
+ ++ strbrk " is now marked as deprecated" ++ str " ." )
1356
+ | Some _ , None ->
1357
+ (str " Cancelling previous deprecation of notation" ++ spc () ++
1358
+ pr_notation ntn ++ pr_optional_scope scope ++ str " ." )
1359
+ | Some _ , Some _ ->
1360
+ (str " Amending deprecation of notation" ++ spc () ++
1361
+ pr_notation ntn ++ pr_optional_scope scope ++ str " ." ))
1358
1362
1359
1363
let warn_override_if_needed (scopt ,ntn ) overridden data old_data =
1360
1364
if overridden then warn_notation_overridden (scopt,ntn)
@@ -2471,12 +2475,12 @@ let toggle_notations_in_scope ~on found inscope ntn_pattern ntns =
2471
2475
data) ntns
2472
2476
2473
2477
let warn_abbreviation_not_bound_to_entry =
2474
- CWarnings. create ~name: " conflicting-abbreviation-entry" ~category: " query "
2478
+ CWarnings. create ~name: " conflicting-abbreviation-entry" ~category: CWarnings.CoreCategories. syntax
2475
2479
(fun () ->
2476
2480
strbrk " Activation of abbreviations does not expect mentioning a grammar entry." )
2477
2481
2478
2482
let warn_abbreviation_not_bound_to_scope =
2479
- CWarnings. create ~name: " conflicting-abbreviation-scope" ~category: " query "
2483
+ CWarnings. create ~name: " conflicting-abbreviation-scope" ~category: CWarnings.CoreCategories. syntax
2480
2484
(fun () ->
2481
2485
strbrk " Activation of abbreviations does not expect mentioning a scope." )
2482
2486
0 commit comments