typelevel / cats

Lightweight, modular, and extensible library for functional programming.
https://typelevel.org/cats/
Other
5.26k stars 1.21k forks source link

Make Later covariant in its type parameter #4631

Closed yanns closed 2 months ago

yanns commented 4 months ago

Later is an instance of Eval

final class Later[A](f: () => A) extends Eval.Leaf[A]

And Eval is covariant.

I'm having the same issue as described in https://github.com/typelevel/cats/pull/937 but for Later. We could make Later covariant as well.