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

ApplicativeError: add raiseOption operation. #3358

Merged
merged 1 commit into from
Jun 21, 2020
Merged

ApplicativeError: add raiseOption operation. #3358

merged 1 commit into from
Jun 21, 2020

Conversation

diesalbla
Copy link
Contributor

@diesalbla diesalbla commented Mar 15, 2020

Add a raiseOption method to the ApplicativeError type-class, to raise possible errors if they are in there.

LukaJCB
LukaJCB previously approved these changes Mar 15, 2020
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.

Sounds like a good addition to me 👍

djspiewak
djspiewak previously approved these changes Mar 16, 2020
travisbrown
travisbrown previously approved these changes Mar 20, 2020
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.

👍, only a couple of comments on the docs.

core/src/main/scala/cats/ApplicativeError.scala Outdated Show resolved Hide resolved
core/src/main/scala/cats/ApplicativeError.scala Outdated Show resolved Hide resolved
@diesalbla diesalbla dismissed stale reviews from travisbrown, djspiewak, and LukaJCB via 92031da March 20, 2020 09:35
@diesalbla diesalbla marked this pull request as ready for review March 20, 2020 09:47
Copy link
Contributor

@kailuowang kailuowang left a comment

Choose a reason for hiding this comment

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

I slightly prefer to add it to Option syntax, which will be a symmetrical version of liftTo. Maybe call it raiseTo

Within an effect F with ApplicativeError instance, this allows us to
raise an option if there is Some error, or skip if it there is None.
@codecov-commenter
Copy link

Codecov Report

Merging #3358 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3358      +/-   ##
==========================================
- Coverage   91.74%   91.73%   -0.02%     
==========================================
  Files         383      377       -6     
  Lines        8399     8105     -294     
  Branches      218      191      -27     
==========================================
- Hits         7706     7435     -271     
+ Misses        693      670      -23     

@LukaJCB
Copy link
Member

LukaJCB commented Jun 21, 2020

Thanks @diesalbla!

@LukaJCB LukaJCB merged commit 1411dcf into typelevel:master Jun 21, 2020
@travisbrown travisbrown added this to the 2.2.0-RC1 milestone Jul 6, 2020
@diesalbla diesalbla deleted the Applicative_error_raise_option branch July 27, 2023 21:39
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.

7 participants