Skip to content

Commit 3dc6a53

Browse files
committed
adding a prime to NameMapExtension
1 parent b9d27c2 commit 3dc6a53

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

Mathlib/Tactic/Eqns.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ open Lean Elab
3737

3838
syntax (name := eqns) "eqns" (ppSpace ident)* : attr
3939

40-
initialize eqnsAttribute : NameMapExtension (Array Name) ←
40+
initialize eqnsAttribute : NameMapExtension' (Array Name) ←
4141
registerNameMapAttribute {
4242
name := `eqns
4343
descr := "Overrides the equation lemmas for a declaration to the provided list"

Mathlib/Tactic/Simps/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ structure, used by the `@[simps]` attribute.
415415
- The first argument is the list of names of the universe variables used in the structure
416416
- The second argument is an array that consists of the projection data for each projection.
417417
-/
418-
initialize structureExt : NameMapExtension (List Name × Array ProjectionData) ←
419-
registerNameMapExtension (List Name × Array ProjectionData)
418+
initialize structureExt : NameMapExtension' (List Name × Array ProjectionData) ←
419+
registerNameMapExtension' (List Name × Array ProjectionData)
420420

421421
/-- Projection data used internally in `getRawProjections`. -/
422422
structure ParsedProjectionData where

Mathlib/Tactic/Simps/NotationClass.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ deriving Inhabited
104104

105105
/-- `@[notation_class]` attribute. Note: this is *not* a `NameMapAttribute` because we key on the
106106
argument of the attribute, not the declaration name. -/
107-
initialize notationClassAttr : NameMapExtension AutomaticProjectionData ← do
108-
let ext ← registerNameMapExtension AutomaticProjectionData
107+
initialize notationClassAttr : NameMapExtension' AutomaticProjectionData ← do
108+
let ext ← registerNameMapExtension' AutomaticProjectionData
109109
registerBuiltinAttribute {
110110
name := `notation_class
111111
descr := "An attribute specifying that this is a notation class. Used by @[simps]."

Mathlib/Tactic/Translate/Core.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ register_option linter.translateReorder : Bool := {
139139
equal to the automatically generated one" }
140140

141141
@[inherit_doc translate_change_numeral]
142-
initialize changeNumeralAttr : NameMapExtension (List Nat) ←
142+
initialize changeNumeralAttr : NameMapExtension' (List Nat) ←
143143
registerNameMapAttribute {
144144
name := `translate_change_numeral
145145
descr :=
@@ -162,9 +162,9 @@ structure TranslateData : Type where
162162
involved when translating.
163163
This helps the translation heuristic by also transforming definitions if `ℕ` or another
164164
fixed type occurs as one of these arguments. -/
165-
ignoreArgsAttr : NameMapExtension (List Nat)
165+
ignoreArgsAttr : NameMapExtension' (List Nat)
166166
/-- `argInfoAttr` stores the declarations that need some extra information to be translated. -/
167-
argInfoAttr : NameMapExtension ArgInfo
167+
argInfoAttr : NameMapExtension' ArgInfo
168168
/-- The global `do_translate`/`dont_translate` attributes specify whether operations on
169169
a given type should be translated. `dont_translate` can be used for types that are translated,
170170
such as `MonoidAlgebra` -> `AddMonoidAlgebra`, or for fixed types, such as `Fin n`/`ZMod n`.
@@ -174,10 +174,10 @@ structure TranslateData : Type where
174174
Note: The name generation is not aware of `dont_translate`, so if some part of a lemma is not
175175
translated thanks to this, you generally have to specify the translated name manually.
176176
-/
177-
doTranslateAttr : NameMapExtension Bool
177+
doTranslateAttr : NameMapExtension' Bool
178178
/-- `translations` stores all of the constants that have been tagged with this attribute,
179179
and maps them to their translation. -/
180-
translations : NameMapExtension Name
180+
translations : NameMapExtension' Name
181181
/-- The name of the attribute, for example `to_additive` or `to_dual`. -/
182182
attrName : Name
183183
/-- If `changeNumeral := true`, then try to translate the number `1` to `0`. -/

Mathlib/Tactic/Translate/ToAdditive.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ macro "to_additive?" rest:attrArgs : attr => `(attr| to_additive ? $rest)
251251

252252

253253
@[inherit_doc to_additive_ignore_args]
254-
initialize ignoreArgsAttr : NameMapExtension (List Nat) ←
254+
initialize ignoreArgsAttr : NameMapExtension' (List Nat) ←
255255
registerNameMapAttribute {
256256
name := `to_additive_ignore_args
257257
descr :=
@@ -263,10 +263,10 @@ initialize ignoreArgsAttr : NameMapExtension (List Nat) ←
263263
return ids.toList }
264264

265265
@[inherit_doc TranslateData.argInfoAttr]
266-
initialize argInfoAttr : NameMapExtension ArgInfo ← registerNameMapExtension _
266+
initialize argInfoAttr : NameMapExtension' ArgInfo ← registerNameMapExtension' _
267267

268268
@[inherit_doc TranslateData.doTranslateAttr]
269-
initialize doTranslateAttr : NameMapExtension Bool ← registerNameMapExtension _
269+
initialize doTranslateAttr : NameMapExtension' Bool ← registerNameMapExtension' _
270270

271271
initialize
272272
registerBuiltinAttribute {
@@ -281,7 +281,7 @@ initialize
281281
add name _ _ := doTranslateAttr.add name false }
282282

283283
/-- Maps multiplicative names to their additive counterparts. -/
284-
initialize translations : NameMapExtension Name ← registerNameMapExtension _
284+
initialize translations : NameMapExtension' Name ← registerNameMapExtension' _
285285

286286
@[inherit_doc GuessName.GuessNameData.nameDict]
287287
def nameDict : Std.HashMap String (List String) := .ofList [

Mathlib/Tactic/Translate/ToDual.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ syntax (name := to_dual) "to_dual" "?"? attrArgs : attr
8989
macro "to_dual?" rest:attrArgs : attr => `(attr| to_dual ? $rest)
9090

9191
@[inherit_doc to_dual_ignore_args]
92-
initialize ignoreArgsAttr : NameMapExtension (List Nat) ←
92+
initialize ignoreArgsAttr : NameMapExtension' (List Nat) ←
9393
registerNameMapAttribute {
9494
name := `to_dual_ignore_args
9595
descr :=
@@ -101,10 +101,10 @@ initialize ignoreArgsAttr : NameMapExtension (List Nat) ←
101101
return ids.toList }
102102

103103
@[inherit_doc TranslateData.argInfoAttr]
104-
initialize argInfoAttr : NameMapExtension ArgInfo ← registerNameMapExtension _
104+
initialize argInfoAttr : NameMapExtension' ArgInfo ← registerNameMapExtension' _
105105

106106
@[inherit_doc TranslateData.doTranslateAttr]
107-
initialize doTranslateAttr : NameMapExtension Bool ← registerNameMapExtension _
107+
initialize doTranslateAttr : NameMapExtension' Bool ← registerNameMapExtension' _
108108

109109
initialize
110110
registerBuiltinAttribute {
@@ -119,7 +119,7 @@ initialize
119119
add name _ _ := doTranslateAttr.add name false }
120120

121121
/-- Maps names to their dual counterparts. -/
122-
initialize translations : NameMapExtension Name ← registerNameMapExtension _
122+
initialize translations : NameMapExtension' Name ← registerNameMapExtension' _
123123

124124
@[inherit_doc GuessName.GuessNameData.nameDict]
125125
def nameDict : Std.HashMap String (List String) := .ofList [

0 commit comments

Comments
 (0)