Skip to content

Commit 6302f63

Browse files
committed
chore: rename manifold delaborators to match the naming convention (#39821)
Change from delab_foo to delabFoo (as these are Type-valued, not Prop-valued, so should be lowerCamelCase by naming rule 4). And ensure to namespace all delaborators under manifold. This should not need deprecations, as presumably these delaborators are never called directly.
1 parent 072be06 commit 6302f63

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

Mathlib/Geometry/Manifold/MFDeriv/NormedSpace.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ open Bundle PrettyPrinter Delaborator SubExpr
431431
-- There is no need to special-case any arguments which could use the T% s elaborator:
432432
-- the argument to `mvfderiv` is a vector-valued function, which a map to a total space
433433
-- can never be.
434-
@[app_delab mvfderiv] meta def delab_mvfderiv : Delab := do
434+
@[app_delab mvfderiv] meta def delabMVFDeriv : Delab := do
435435
whenPPOption getPPNotation do
436436
withOverApp 15 do
437437
let fs ← withAppArg delab

Mathlib/Geometry/Manifold/Notation.lean

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -973,26 +973,28 @@ initialize registerTraceClass `Elab.DiffGeo.MDiff (inherited := true)
973973

974974
end trace
975975

976-
section delaborators
977-
978976
/-!
979977
### Delaborators
980978
981-
In this section we make sure the infoview also uses those notations.
982-
Not all notations are supported yet.
979+
In this section we make sure the infoview also uses the above notation.
980+
Not all elaborators are supported yet.
983981
-/
982+
section delaborators
983+
984+
namespace Manifold
985+
984986
open Bundle PrettyPrinter Delaborator SubExpr
985987

986988
/-- Delaborator for `Bundle.TotalSpace.mk` using anonymous constructor notation. -/
987-
@[app_delab TotalSpace.mk] meta def delabTotalSpace_mk : Delab := do
989+
@[app_delab TotalSpace.mk] meta def delabTotalSpaceMk : Delab := do
988990
whenPPOption getPPNotation do
989991
withOverApp 5 do
990992
let bd ← withNaryArg 3 <| delab
991993
let vd ← withNaryArg 4 <| delab
992994
`(⟨$bd, $vd⟩)
993995

994996
/-- Delaborator for `Bundle.TotalSpace.mk'` using anonymous constructor notation. -/
995-
@[app_delab Bundle.TotalSpace.mk'] meta def delabTotalSpace_mk' : Delab := do
997+
@[app_delab Bundle.TotalSpace.mk'] meta def delabTotalSpaceMkPrime : Delab := do
996998
whenPPOption getPPNotation do
997999
withOverApp 5 do
9981000
let bd ← withNaryArg 3 <| delab
@@ -1001,7 +1003,7 @@ open Bundle PrettyPrinter Delaborator SubExpr
10011003

10021004
/-- Delaborator for `mfderiv` using the custom elaborator, and special-casing
10031005
arguments that can use the `T%` elaborator. -/
1004-
@[app_delab mfderiv] meta def delab_mfderiv : Delab := do
1006+
@[app_delab mfderiv] meta def delabMFDeriv : Delab := do
10051007
whenPPOption getPPNotation do
10061008
withOverApp 21 do
10071009
try
@@ -1103,4 +1105,6 @@ arguments that can use the `T%` elaborator. -/
11031105

11041106
-- TODO: when adding more elaborators, also add the corresponding delaborators
11051107

1108+
end Manifold
1109+
11061110
end delaborators

scripts/nolints.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
["defsWithUnderscore", "cfcₙHom_of_cfcHom"],
55
["defsWithUnderscore", "commandSuppress_compilation"],
66
["defsWithUnderscore", "decidableEq_of_subsingleton"],
7-
["defsWithUnderscore", "delabTotalSpace_mk"],
8-
["defsWithUnderscore", "delabTotalSpace_mk'"],
9-
["defsWithUnderscore", "delab_mfderiv"],
107
["defsWithUnderscore", "delab_not_in"],
118
["defsWithUnderscore", "equiv_linearIndependent"],
129
["defsWithUnderscore", "exists_delab"],
@@ -186,7 +183,6 @@
186183
["defsWithUnderscore", "List.lex_chains"],
187184
["defsWithUnderscore", "List.maximum_of_length_pos"],
188185
["defsWithUnderscore", "List.minimum_of_length_pos"],
189-
["defsWithUnderscore", "Manifold.delab_mvfderiv"],
190186
["defsWithUnderscore", "Matrix.cons_val"],
191187
["defsWithUnderscore", "Matrix.equiv_GL_linearindependent"],
192188
["defsWithUnderscore", "Matroid.aesop_mat"],

0 commit comments

Comments
 (0)