-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add Result Extraction Helpers #286
Conversation
3135393
to
e17aabe
Compare
src/Relude_Result.re
Outdated
Result.getErrorOrElse("Handled", Ok({id, payload})) == "Handled"; | ||
]} | ||
*/ | ||
let getErrorOrElse: 'e 'e. ('e, t('a, 'e)) => 'e = |
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.
Did you want the universal types to be 'a 'e.
here?
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! not sure how those crept in. Fixed in next commit :)
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.
Looks great! Thanks for adding these. I'll give @mlms13 a chance to look, but I'm good to merge
This looks great to me! Thanks for adding tests and all the doc comments as well!. |
No worries, thank you guys for putting in all the effort to build and maintain this! |
I can push out a new release this evening |
As discussed in: #285
This PR adds the following three functions:
Since these are a bit niche, the examples are a bit niche as well. Given the rest of the examples they might be a bit verbose. Please let me know if that's the case, then I'll try and make it less so.
The PR can be reviewed commit-by-commit.