Skip to content

Commit 83f04b3

Browse files
committed
more inline
1 parent 6bb9a32 commit 83f04b3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Init/Data/Iterators/Combinators/Monadic/FlatMap.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ This combinator incurs an additional O(1) cost with each output of `it` or an in
114114
115115
For each value emitted by the outer iterator `it`, this combinator calls `f`.
116116
-/
117-
@[always_inline, expose]
117+
@[always_inline, inline, expose]
118118
public def IterM.flatMapM {α : Type w} {β : Type w} {α₂ : Type w}
119119
{γ : Type w} {m : Type w → Type w'} [Monad m] [Iterator α m β] [Iterator α₂ m γ]
120120
(f : β → m (IterM (α := α₂) m γ)) (it : IterM (α := α) m β) :=
@@ -195,7 +195,7 @@ This combinator incurs an additional O(1) cost with each output of `it` or an in
195195
196196
For each value emitted by the outer iterator `it`, this combinator calls `f`.
197197
-/
198-
@[always_inline, expose]
198+
@[always_inline, inline, expose]
199199
public def IterM.flatMap {α : Type w} {β : Type w} {α₂ : Type w}
200200
{γ : Type w} {m : Type w → Type w'} [Monad m] [Iterator α m β] [Iterator α₂ m γ]
201201
(f : β → IterM (α := α₂) m γ) (it : IterM (α := α) m β) :=

src/Init/Data/Iterators/Consumers/Loop.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,12 @@ def Iter.Partial.find? {α β : Type w} [Iterator α Id β] [IteratorLoop α Id
240240
(it : Iter.Partial (α := α) β) (f : β → Bool) : Option β :=
241241
it.it.find? f
242242

243-
@[always_inline, expose, inherit_doc IterM.size]
243+
@[always_inline, inline, expose, inherit_doc IterM.size]
244244
def Iter.size {α : Type w} {β : Type w} [Iterator α Id β] [IteratorSize α Id]
245245
(it : Iter (α := α) β) : Nat :=
246246
(IteratorSize.size it.toIterM).run.down
247247

248-
@[always_inline, inherit_doc IterM.Partial.size]
248+
@[always_inline, inline, inherit_doc IterM.Partial.size]
249249
def Iter.Partial.size {α : Type w} {β : Type w} [Iterator α Id β] [IteratorSizePartial α Id]
250250
(it : Iter (α := α) β) : Nat :=
251251
(IteratorSizePartial.size it.toIterM).run.down

src/Init/Data/Iterators/Consumers/Monadic/Loop.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ instance IteratorLoop.WithWF.instWellFoundedRelation
114114
/--
115115
This is the loop implementation of the default instance `IteratorLoop.defaultImplementation`.
116116
-/
117-
@[always_inline, expose]
117+
@[always_inline, inline, expose]
118118
def IterM.DefaultConsumers.forIn' {m : Type w → Type w'} {α : Type w} {β : Type w}
119119
[Iterator α m β]
120120
{n : Type x → Type x'} [Monad n]
@@ -169,7 +169,7 @@ This is the default implementation of the `IteratorLoop` class.
169169
It simply iterates through the iterator using `IterM.step`. For certain iterators, more efficient
170170
implementations are possible and should be used instead.
171171
-/
172-
@[always_inline, expose]
172+
@[always_inline, inline, expose]
173173
def IteratorLoop.defaultImplementation {α : Type w} {m : Type w → Type w'} {n : Type x → Type x'}
174174
[Monad n] [Iterator α m β] :
175175
IteratorLoop α m n where

0 commit comments

Comments
 (0)