These are chat archives for typelevel/scala

3rd
Dec 2016
Alexander Konovalov
@alexknvl
Dec 03 2016 00:02
When you say that UbikList can keep F[_]: * -> *, isn't it actually F[Any]: *? I.e. there are no concrete types of kind * -> * and therefore no values?
Is it possible to combine regular functors and "higher-order functors" using <: AnyKind?
// F: * -> *
trait Functor[F[_]] {
  def map[A, B](f: A => B): F[A] => F[B]
}

// T: (* -> *) -> * -> *
trait Functor1[T[_[_], _]] {
  def map1[F[_]: Functor, G[_]: Functor](fg: F ~> G): T[F, ?] ~> T[G, ?]
}
Pascal Voitot
@mandubian
Dec 03 2016 00:09
@alexknvl
you can write that
val l2 = List("tutu") :: Bar("tata") :: HNil2[String]()
with case class HNil2[A]() extends UbikNil[A :: HNil]
so it's a List of F[T](*->*) where T is the same for all F[_] and T === String
Alexander Konovalov
@alexknvl
Dec 03 2016 00:11
Aaah, I see.
Pascal Voitot
@mandubian
Dec 03 2016 00:12
but what's cool is that with a few LoC, you can also write
and For the Functor, I've started investigating ;)
Pascal Voitot
@mandubian
Dec 03 2016 00:18
ok time to sleep, I've done my quota of innovation for today ;)
Miles Sabin
@milessabin
Dec 03 2016 00:19
Deserved :-)