-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override fromTry and fromEither for Try and Either #1660
Conversation
Add an ApplicativeError law ensuring consistency between attempt/fromEither and pure.
Codecov Report
@@ Coverage Diff @@
## master #1660 +/- ##
==========================================
- Coverage 93.38% 93.33% -0.05%
==========================================
Files 240 240
Lines 3943 3945 +2
Branches 137 134 -3
==========================================
Hits 3682 3682
- Misses 261 263 +2
Continue to review full report at Codecov.
|
@@ -46,7 +46,8 @@ trait ApplicativeErrorTests[F[_], E] extends ApplicativeTests[F] { | |||
"applicativeError handleErrorWith consistent with recoverWith" -> forAll(laws.handleErrorWithConsistentWithRecoverWith[A] _), | |||
"applicativeError handleError consistent with recover" -> forAll(laws.handleErrorConsistentWithRecover[A] _), | |||
"applicativeError recover consistent with recoverWith" -> forAll(laws.recoverConsistentWithRecoverWith[A] _), | |||
"applicativeError attempt consistent with attemptT" -> forAll(laws.attemptConsistentWithAttemptT[A] _) | |||
"applicativeError attempt consistent with attemptT" -> forAll(laws.attemptConsistentWithAttemptT[A] _), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch.
👍 thanks, I thought about raising those up in that PR, but somehow it slipped my mind. |
👍 thanks! |
ApplicativeError#fromTry
forTry
ApplicativeError#fromEither
forEither
ApplicativeError
ensuring consistency betweenattempt
+fromEither
andpure
.The last two are sort of a follow up after #1651.