-
-
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
ApplicativeError: add raiseOption operation. #3358
ApplicativeError: add raiseOption operation. #3358
Conversation
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.
Sounds like a good addition to me 👍
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.
👍, only a couple of comments on the docs.
92031da
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.
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 Report
@@ 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 |
Thanks @diesalbla! |
Add a
raiseOption
method to theApplicativeError
type-class, to raise possible errors if they are in there.