File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
modules/deriving/src/test/scala/shapeless3/deriving Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 1
- import sbtcrossproject .CrossPlugin .autoImport .{crossProject , CrossType }
2
-
3
1
val dottyVersion = " 3.0.0"
4
2
5
3
ThisBuild / organization := " org.typelevel"
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ object Foldable {
263
263
def foldRight [A , B ](fa : F [A ])(lb : Eval [B ])(f : (A , Eval [B ]) => Eval [B ]): Eval [B ] =
264
264
inst.foldRight[A , Eval [B ]](fa)(lb)(
265
265
[t[_]] => (fd : Foldable [t], t0 : t[A ], acc : Eval [B ]) =>
266
- Continue (acc.flatMap(acc0 => fd.foldRight(t0)(Eval .now(acc0) )(f)))
266
+ Continue (Eval .defer( fd.foldRight(t0)(acc )(f)))
267
267
)
268
268
269
269
given foldableCoproduct [F [_]](using inst : => K1 .CoproductInstances [Foldable , F ]): Foldable [F ] with
@@ -274,7 +274,7 @@ object Foldable {
274
274
275
275
def foldRight [A , B ](fa : F [A ])(lb : Eval [B ])(f : (A , Eval [B ]) => Eval [B ]): Eval [B ] =
276
276
inst.fold[A , Eval [B ]](fa)(
277
- [t[_]] => (fd : Foldable [t], t0 : t[A ]) => lb.flatMap(lb0 => fd.foldRight(t0)(Eval .now(lb0) )(f))
277
+ [t[_]] => (fd : Foldable [t], t0 : t[A ]) => Eval .defer( fd.foldRight(t0)(lb )(f))
278
278
)
279
279
280
280
inline def derived [F [_]](using gen : K1 .Generic [F ]): Foldable [F ] =
You can’t perform that action at this time.
0 commit comments