Skip to content

Commit 79f4871

Browse files
committed
use the module role
1 parent 6ca25de commit 79f4871

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

src/Init/Data/Range/Polymorphic/Iterators.lean

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ namespace Rcc
6262

6363
variable {α : Type u}
6464

65-
-- TODO: Replace the `lit` role with a `module` role?
6665
/--
6766
Internal function that constructs an iterator for a closed range {lit}`lo...=hi`.
6867
This is an internal function.
6968
Use {name (scope := "Std.Data.Iterators.Producers.Range")}`Rcc.iter` instead, which requires
70-
importing {lit}`Std.Data.Iterators`.
69+
importing {module -checked}`Std.Data.Iterators`.
7170
-/
7271
@[always_inline, inline]
7372
def Internal.iter [UpwardEnumerable α] (r : Rcc α) : Iter (α := Rxc.Iterator α) α :=
@@ -149,12 +148,11 @@ namespace Rco
149148

150149
variable {α : Type u}
151150

152-
-- TODO: Replace the `lit` role with a `module` role?
153151
/--
154152
Internal function that constructs an iterator for a closed range {lit}`lo...hi`.
155153
This is an internal function.
156154
Use {name (scope := "Std.Data.Iterators.Producers.Range")}`Rco.iter` instead, which requires
157-
importing {lit}`Std.Data.Iterators`.
155+
importing {module -checked}`Std.Data.Iterators`.
158156
-/
159157
@[always_inline, inline]
160158
def Internal.iter [UpwardEnumerable α] (r : Rco α) : Iter (α := Rxo.Iterator α) α :=
@@ -236,12 +234,11 @@ namespace Rci
236234

237235
variable {α : Type u}
238236

239-
-- TODO: Replace the `lit` role with a `module` role?
240237
/--
241238
Internal function that constructs an iterator for a closed range {lit}`lo...*`.
242239
This is an internal function.
243240
Use {name (scope := "Std.Data.Iterators.Producers.Range")}`Rcc.iter` instead, which requires
244-
importing {lit}`Std.Data.Iterators`.
241+
importing {module -checked}`Std.Data.Iterators`.
245242
-/
246243
@[always_inline, inline]
247244
def Internal.iter [UpwardEnumerable α] (r : Rci α) : Iter (α := Rxi.Iterator α) α :=
@@ -322,12 +319,11 @@ namespace Roc
322319

323320
variable {α : Type u}
324321

325-
-- TODO: Replace the `lit` role with a `module` role?
326322
/--
327323
Internal function that constructs an iterator for a left-open right-closed range {lit}`lo<...=hi`.
328324
This is an internal function.
329325
Use {name (scope := "Std.Data.Iterators.Producers.Range")}`Roc.iter` instead, which requires
330-
importing {lit}`Std.Data.Iterators`.
326+
importing {module -checked}`Std.Data.Iterators`.
331327
-/
332328
@[always_inline, inline]
333329
def Internal.iter [UpwardEnumerable α] (r : Roc α) : Iter (α := Rxc.Iterator α) α :=
@@ -402,12 +398,11 @@ namespace Roo
402398

403399
variable {α : Type u}
404400

405-
-- TODO: Replace the `lit` role with a `module` role?
406401
/--
407402
Internal function that constructs an iterator for an open range {lit}`lo<...hi`.
408403
This is an internal function.
409404
Use {name (scope := "Std.Data.Iterators.Producers.Range")}`Roo.iter` instead, which requires
410-
importing {lit}`Std.Data.Iterators`.
405+
importing {module -checked}`Std.Data.Iterators`.
411406
-/
412407
@[always_inline, inline]
413408
def Internal.iter [UpwardEnumerable α] (r : Roo α) : Iter (α := Rxo.Iterator α) α :=
@@ -481,12 +476,11 @@ namespace Roi
481476

482477
variable {α : Type u}
483478

484-
-- TODO: Replace the `lit` role with a `module` role?
485479
/--
486480
Internal function that constructs an iterator for a closed range {lit}`lo<...*`.
487481
This is an internal function.
488482
Use {name (scope := "Std.Data.Iterators.Producers.Range")}`Roi.iter` instead, which requires
489-
importing {lit}`Std.Data.Iterators`.
483+
importing {module -checked}`Std.Data.Iterators`.
490484
-/
491485
@[always_inline, inline]
492486
def Internal.iter [UpwardEnumerable α] (r : Roi α) : Iter (α := Rxi.Iterator α) α :=
@@ -556,12 +550,11 @@ namespace Ric
556550

557551
variable {α : Type u}
558552

559-
-- TODO: Replace the `lit` role with a `module` role?
560553
/--
561554
Internal function that constructs an iterator for a left-unbounded right-closed range {lit}`*...=hi`.
562555
This is an internal function.
563556
Use {name (scope := "Std.Data.Iterators.Producers.Range")}`Ric.iter` instead, which requires
564-
importing {lit}`Std.Data.Iterators`.
557+
importing {module -checked}`Std.Data.Iterators`.
565558
-/
566559
@[always_inline, inline]
567560
def Internal.iter [Least? α] (r : Ric α) : Iter (α := Rxc.Iterator α) α :=
@@ -630,12 +623,11 @@ namespace Rio
630623

631624
variable {α : Type u}
632625

633-
-- TODO: Replace the `lit` role with a `module` role?
634626
/--
635627
Internal function that constructs an iterator for a left-unbounded right-open range {lit}`*...hi`.
636628
This is an internal function.
637629
Use {name (scope := "Std.Data.Iterators.Producers.Range")}`Rio.iter` instead, which requires
638-
importing {lit}`Std.Data.Iterators`.
630+
importing {module -checked}`Std.Data.Iterators`.
639631
-/
640632
@[always_inline, inline]
641633
def Internal.iter [UpwardEnumerable α] [Least? α] (r : Rio α) : Iter (α := Rxo.Iterator α) α :=
@@ -703,12 +695,11 @@ namespace Rii
703695

704696
variable {α : Type u}
705697

706-
-- TODO: Replace the `lit` role with a `module` role?
707698
/--
708699
Internal function that constructs an iterator for the full range {lean}`*...*`.
709700
This is an internal function.
710701
Use {name (scope := "Std.Data.Iterators.Producers.Range")}`Rio.iter` instead, which requires
711-
importing {lit}`Std.Data.Iterators`.
702+
importing {module -checked}`Std.Data.Iterators`.
712703
-/
713704
@[always_inline, inline]
714705
def Internal.iter [UpwardEnumerable α] [Least? α] (_ : Rii α) : Iter (α := Rxi.Iterator α) α :=

src/Init/Data/Range/Polymorphic/Nat.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,10 @@ instance : LinearlyUpwardEnumerable Nat := inferInstance
7979

8080
end PRange
8181

82-
-- TODO: Replace the `lit` role with a `module` role?
8382
/-!
8483
The following instances are used for the implementation of array slices a.k.a.
8584
{name (scope := "Init.Data.Array.Subarray")}`Subarray`.
86-
See also {lit}`Init.Data.Slice.Array`.
85+
See also {module -checked}`Init.Data.Slice.Array`.
8786
-/
8887

8988
instance : Roo.HasRcoIntersection Nat where

0 commit comments

Comments
 (0)