Add EitherT.liftAttemptK#3374
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3374 +/- ##
==========================================
+ Coverage 93.32% 93.32% +<.01%
==========================================
Files 378 378
Lines 7728 7729 +1
Branches 207 209 +2
==========================================
+ Hits 7212 7213 +1
Misses 516 516
Continue to review full report at Codecov.
|
| * }}} | ||
| */ | ||
| final def liftAttemptK[F[_], E](implicit F: ApplicativeError[F, E]): F ~> EitherT[F, E, *] = | ||
| λ[F ~> EitherT[F, E, *]](fa => EitherT(F.attempt(fa))) |
There was a problem hiding this comment.
We've been removing the value-level kind-projector syntax for polymorphic functions, since there's no real possibility of it ever cross-building on Dotty, and since writing this out explicitly as:
new (F ~> EitherT[F, E, *]) { def apply[A](fa: F[A]): EitherT[F, E, A] = EitherT(F.attempt(fa)) }…is only marginally less readable. I don't think that needs to be changed in this PR, though, since we're not actually cross-building on Dotty yet.
(Note that the type-level λ is fine on Dotty with -Ykind-projector.)
There was a problem hiding this comment.
oh, I was under the impression this was also part of the -Ykind-projector feature. But it makes sense, I'll keep it in mind.
There was a problem hiding this comment.
@kubukoz No, I hate kind-projector's value-level lambda syntax and couldn't be bothered to implement it in -Ykind-projector. 😄 (Also it would have required much more disruptive changes than anything else that made it into -Ykind-projector.)
No description provided.