-
Notifications
You must be signed in to change notification settings - Fork 455
Add kdoc for MonadThrow #1237
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 kdoc for MonadThrow #1237
Conversation
* errors as failed computations in their monadic context and not letting exceptions thrown as the regular monad binding does. | ||
* This one operates over [MonadError] instances that can support [Throwable] in their error type automatically | ||
* lifting errors as failed computations in their monadic context and not letting exceptions thrown as the regular | ||
* monad binding does. |
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.
Can we add a playground example similar to those in Bracket and Functor that illustrates the usage of bindingCatch
?
Monadthrow it's just a |
Can we merge this @raulraja or should we revert to that one liner you mention ? |
The example is good but it needs to use the |
Can you share an example of that? |
Thanks I'll fix it tomorrow. |
I've updated the sample to use After comiting that, the snippet disappeared from docs and looks like this: Is it about labeling it as |
The extension example can be added in the same way as in Functor. the example goes in the header of the class and when it is postfixed by |
it may be that it worked but you have to look in the extensions when looking at the docs. For example the Try MonadThrow extensions. Let's see if it projected the example there and you can make it run |
I don't really know what I'm doing wrong, but can't really make this work. Adding what's on this commit I'd expect to get a simple runnable snippet showcasing instatiation projected to extensions (like the one for functor), but I can't either see any sample projected in the Try.monadThrow docs for example. Given that there are no docs on how to use Ank for this and that it takes a very big while to trial and error, I'd need some help with an actual commit fixing what's bad here to understand how it should be done. That's gonna be faster most likely. |
…nto 1111-jc-monadthrow-docs
I fixed the docs, and to summarize the steps you have take.
Can you double check if I missed something @raulraja? @JorgeCastilloPrz care to update the documentation docs with this information? |
We should add a link in the type classes section that points to the main page in the apidocs for MonadThrow. fine in a different PR. Great stuff @JorgeCastilloPrz 👏 |
fixes #1111
Would we need to add a specific section for
MonadThrow
in the Type Classes docs section, apart from the already generated dokka one in API Docs / Typeclasses ? In case we do, what should it describe?MonadThrow