Skip to content

Conversation

@travisbrown
Copy link
Contributor

This PR includes @alexandru's first commit from #2237 but removes the EitherT enhancements and focuses on the part that fixes #2161 (new redeem and redeemWith methods).

See typelevel/cats-effect#191 for additional discussion.

I still think we should try to get the EitherT improvements merged, but redeem seems like a higher priority for 2.1.0. I've also reverted some other changes in the original commit in order to preserve binary compatibility.

Note that I've moved redeem from MonadError to ApplicativeError and have added syntax and syntax tests.

@codecov-io
Copy link

codecov-io commented Nov 13, 2019

Codecov Report

Merging #3146 into master will decrease coverage by 0.02%.
The diff coverage is 84.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3146      +/-   ##
==========================================
- Coverage   93.28%   93.25%   -0.03%     
==========================================
  Files         376      376              
  Lines        7323     7343      +20     
  Branches      195      186       -9     
==========================================
+ Hits         6831     6848      +17     
- Misses        492      495       +3
Flag Coverage Δ
#scala_version_212 93.58% <84.84%> (-0.04%) ⬇️
#scala_version_213 90.9% <84.84%> (-0.05%) ⬇️
Impacted Files Coverage Δ
core/src/main/scala/cats/syntax/monadError.scala 88.88% <0%> (-11.12%) ⬇️
.../src/main/scala/cats/syntax/applicativeError.scala 94.44% <0%> (-5.56%) ⬇️
core/src/main/scala/cats/instances/either.scala 100% <100%> (ø) ⬆️
core/src/main/scala/cats/ApplicativeError.scala 100% <100%> (ø) ⬆️
...n/scala/cats/laws/discipline/MonadErrorTests.scala 100% <100%> (ø) ⬆️
core/src/main/scala/cats/instances/option.scala 98.27% <100%> (+0.12%) ⬆️
...a/cats/laws/discipline/ApplicativeErrorTests.scala 100% <100%> (ø) ⬆️
laws/src/main/scala/cats/laws/MonadErrorLaws.scala 100% <100%> (ø) ⬆️
...rc/main/scala/cats/laws/ApplicativeErrorLaws.scala 100% <100%> (ø) ⬆️
core/src/main/scala/cats/MonadError.scala 100% <100%> (ø) ⬆️
... and 2 more

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 9bb9636...6ba59df. Read the comment docs.

Copy link
Member

@LukaJCB LukaJCB left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! :)

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

Delighted to see this one arrive.

@travisbrown travisbrown merged commit 53a0f59 into typelevel:master Nov 14, 2019
gagandeepkalra added a commit to gagandeepkalra/cats that referenced this pull request Mar 8, 2020
travisbrown pushed a commit that referenced this pull request Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: MonadError.transformWith

5 participants