Skip to content
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

Cats Effect: Stream & Sink #21

Open
jdegoes opened this issue Apr 24, 2019 · 3 comments
Open

Cats Effect: Stream & Sink #21

jdegoes opened this issue Apr 24, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@jdegoes
Copy link
Member

jdegoes commented Apr 24, 2019

Introduce an effect-polymorphic class atop ZStream & ZSink, with a default implementation for any Cats Effect data type (Cats IO, Monix Task, etc.).

package scalaz.zio.interop

trait Stream[F[_], +A] {
  ...
}
object Stream {
  ...
}

trait Sink[F[_], A, ...] { ... }
object Sink { ... }

The methods will all delegate to ZIO ZStream and ZSink, but they will take the ZIO effects returned by ZStream/ZSink methods and lift it into any effect F[_] that is suitable equipped.

@NeQuissimus
Copy link
Member

Once you have this, we should be able to bring in FS2 pretty easily, no?
Just today had a situation where I needed to interop with FS2...

@timo-schmid
Copy link

This looks super interesting, i'll try to contribute it!

timo-schmid referenced this issue in timo-schmid/scalaz-zio Apr 27, 2019
@timo-schmid
Copy link

I've mostly copied the ideas from zio/zio#791 - feel free to let me know if I'm on the right track, or if I misunderstood anything!

timo-schmid referenced this issue in timo-schmid/scalaz-zio Apr 27, 2019
timo-schmid referenced this issue in timo-schmid/scalaz-zio May 15, 2019
timo-schmid referenced this issue in timo-schmid/scalaz-zio May 29, 2019
@ghostdogpr ghostdogpr transferred this issue from zio/zio Jul 30, 2019
@neko-kai neko-kai added the enhancement New feature or request label Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants
@jdegoes @neko-kai @NeQuissimus @timo-schmid and others