-
Notifications
You must be signed in to change notification settings - Fork 448
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
Refactor IO following Cats #505
Conversation
} | ||
} | ||
override fun <B> map(f: (A) -> B): IO<B> = | ||
// Allowed to do 32 map operations in sequence before |
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.
Quack
|
||
import kategory.Either | ||
|
||
interface IOFrame<in A, out R> : (A) -> R { |
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.
Any way to make these private or protected so they are not abused in the IO public API?
private typealias Callback = (Either<Throwable, Any?>) -> Unit | ||
|
||
@Suppress("UNCHECKED_CAST") | ||
object IORunLoop { |
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.
Same as previous comment regarding visibility
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.
Fixed on Master
Makes IO at least an order of magnitude faster by following the changes in these diffs:
typelevel/cats-effect#90
typelevel/cats-effect#95
The second diff is still WIP so I'll keep an eye for any changes we can apply too.