These are chat archives for typelevel/cats
Welcome! Got a question? Do you have -Ypartial-unification turned on? Other FAQs: http://typelevel.org/cats/faq.html
IsCCons1are parametrized with one or two "continuation" type classes type arguments which are resolved to instances at the computed higher kinded type.
Functorfor it's higher-kinded representation type; and
Functorfor their respective heads and tails.
def apply[F[_]](implicit f: Lazy[Functor[F]]): Functor[F] = f.value
Lazysolve a lot of issues?
Lazyeverywhere means that recursive implicit resolution works the way you would naively expect it to ;-)
Consider something like,
trait Tree[T] case class Leaf[T](t: t) extends Tree[T] case class Node[T](l: Tree[T], r: Tree[T]) extends Tree[T]
To resolve an implicit recursively for
Tree[T] you need implicits for
Leaf[T] (fine) and
Node[T] ... the latter needs an implicit for
Tree[T] for its
r elements, which if coded directly will immediately cause scalac to decide "Divergent!" and bail.
Lazy prevents that.
Lazyit is from shapeless not cats, right?
R[t]is the HList or Coproduct right?