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

Support LazyList for Scala 2.13 #2081

Open
kevin-lee opened this issue Dec 10, 2019 · 3 comments
Open

Support LazyList for Scala 2.13 #2081

kevin-lee opened this issue Dec 10, 2019 · 3 comments
Assignees
Labels
scalaz7 Scalaz 7.x

Comments

@kevin-lee
Copy link

kevin-lee commented Dec 10, 2019

In Scala 2.13, scala.collection.immutable.Stream is deprecated and scala.collection.immutable.LazyList is recommend for replacement.

Deprecated
(Since version 2.13.0) Use LazyList (which is fully lazy) instead of Stream (which has a lazy tail only)

Scalaz doesn't not have LazyListInstance for 2.13. I was thinking about adding LazyListInstance but it's not as simple as adding one typeclass instance since other types and typeclasses use Stream (e.g. scalaz.Zipper, scalaz.Foldable, etc.).

Could you please add LazyListInstance? I'm not sure what can be the best solution for this though. Replacing Stream with LazyList in Scalaz would be nontrival work.

@tonymorris
Copy link
Member

Scalaz has EphemeralStream as the fix, but if you'd like to add the instances for LazyList as a PR, that would be great!

@kevin-lee
Copy link
Author

@tonymorris Thanks for letting me know. I didn't know about EphemeralStream. I think I should try it.

Regarding adding the instances for LazyList, that's what I had tried before I opened this issue ticket. I found that it was not just about the LazyListInstance. Other types and typeclasses (e.g. Zipper, Tree.Node, Foldable, etc.) rely on Stream so those types should be moved to the scala-2.13- folder and new ones using LazyList for Scala 2.13 should be added to the scala-2.13+ folder. Yet I'm not sure if replacing Stream with LazyList for Scala 2.13 is a right solution. Also not sure about consequence of it. It may break another part of Scalaz? So I don't think I'm a right person to do it.

It would be great if others who understand Scalaz well can discuss and come up with a right solution.

@tonymorris
Copy link
Member

I think go for it. The use of Stream is a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scalaz7 Scalaz 7.x
Projects
None yet
Development

No branches or pull requests

3 participants