-
Couldn't load subscription status.
- Fork 1.4k
Replace ZIO[R, E, A] by aliases if possible + update documentation #3741
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
Conversation
|
I wonder if there is pedagogical value in not using the type alias here? I usually use |
|
Good point! I would take another path to improve the pedagogical aspects. type Task[+A] = ZIO[Any, Throwable, A] // Returns `A`, can fails with `Throwable`, depends on nothing (`Any`).
type RIO[-R, +A] = ZIO[R, Throwable, A] // Like `Task`, but depends on `R`.
type UIO[+A] = ZIO[Any, Nothing, A] // Always returns A, never fails (`Nothing`), depends on nothing (`Any`).
type URIO[-R, +A] = ZIO[R, Nothing, A] // Like `UIO`, always returns `A`, never fails (`Nothing`), depends on `R`.
type IO[+E, +A] = ZIO[Any, E, A] // Returns `A`, can fails with `E` , depends on nothing (`Any`)A lot of learning use navigation in the source (go to declaration, then back navigation). As for |
|
I'd suggest to change the docs as well in case of moving forward with these changes. |
|
Sure! Probably a bigger change. I let you guys discuss it if you know which direction it should go. I was just doing some ZIO blogging and that thing got in the way! 😃 Outside of this PR (I don't have any hard opinion on it):
|
|
Okay, let's get this in. I agree we should update the documentation as well and it would be good to add Scaladoc for the type aliases. Do you want to do here or shall we do in a follow up PR? |
|
Can ZIO Initellij be used for this? Copying @hmemcpy. |
|
So what is being proposed here? Specialize all |
|
I think that would be idea. Might be good to have some setting for which ones to rewrite. Like I think the ZIO type aliases are well known so I see the value there but I would wonder if we would want to rewrite all the |
|
@hmemcpy would love to use the plugin for that or ScalaFix. (thank you for the plugin, using it) For information, currently, I am using regexps in IntelliJ to find and replace all occurrences and replace them when needed in the code and in the documentation. |
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 fine, checked all the files.
|
Can you fix the test failures? |
|
@adamgfraser sorry, sure will do, I thought It was just some timeout at the beginning. It's back to normal. btw, @bernit77 is not able to sign the |
|
@ahoy-jon Thanks! We're experiencing an issue with the CLA Assistant functionality. I have opened a ticket with them. |
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.
Thanks for doing this!
Specializing types on
zio.App.