Skip to content
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

Backport #3146 Add redeem and redeemWith #3348

Conversation

gagandeepkalra
Copy link
Contributor

@gagandeepkalra gagandeepkalra commented Mar 8, 2020

This one had few stuff to backport;

since we are not porting consistency law over, see here

and cannot override for specific instances now given we had to maintain BC while implementing, see here

addresses #3143

@codecov-io
Copy link

codecov-io commented Mar 8, 2020

Codecov Report

Merging #3348 into scala_2.11 will decrease coverage by 0.02%.
The diff coverage is 66.66%.

Impacted file tree graph

@@              Coverage Diff               @@
##           scala_2.11    #3348      +/-   ##
==============================================
- Coverage       93.46%   93.43%   -0.03%     
==============================================
  Files             385      385              
  Lines            7162     7164       +2     
  Branches          197      196       -1     
==============================================
  Hits             6694     6694              
- Misses            468      470       +2
Impacted Files Coverage Δ
.../src/main/scala/cats/syntax/applicativeError.scala 94.44% <0%> (-5.56%) ⬇️
core/src/main/scala/cats/syntax/monadError.scala 88.88% <0%> (-11.12%) ⬇️
core/src/main/scala/cats/instances/try.scala 98.18% <100%> (ø) ⬆️
core/src/main/scala/cats/instances/future.scala 81.25% <77.77%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29efba5...9ef5198. Read the comment docs.

@gagandeepkalra gagandeepkalra changed the title Backported #3146 Add redeem and redeemWith Backport #3146 Add redeem and redeemWith Mar 8, 2020
@travisbrown travisbrown self-requested a review March 10, 2020 08:05
Copy link
Contributor

@travisbrown travisbrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.


def raiseError[A](e: Throwable): Future[A] = Future.failed(e)
override def handleError[A](fea: Future[A])(f: Throwable => A): Future[A] = fea.recover { case t => f(t) }
override def handleError[A](fea: Future[A])(f: Throwable => A): Future[A] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no actual changes in this file, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, only formatting

@travisbrown travisbrown merged commit e5c5561 into typelevel:scala_2.11 Mar 11, 2020
@gagandeepkalra gagandeepkalra deleted the backport/monadError/redeemWith branch March 11, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants