Here is the code, I do not know why the last line fail:
Welcome to Scala 3.1.0-RC2 (11.0.9.1, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> type F[T <: Tuple] <: Tuple = T match
| case EmptyTuple => EmptyTuple
| case h *: t => h match
| case Tuple => Tuple.Concat[F[h], F[t]]
| case _ => h *: F[t]
|
scala> summon[F[((Int, Char), String)] =:= (Int, Char, String)]
val res0: Int *: Char *: String *: EmptyTuple =:= Int *: Char *: String *: EmptyTuple = generalized constraint
scala> summon[F[((Int, Char), AnyVal)] =:= (Int, Char, AnyVal)]
val res1: Int *: Char *: AnyVal *: EmptyTuple =:= Int *: Char *: AnyVal *: EmptyTuple = generalized constraint
scala> summon[F[((Int, Char), AnyRef)] =:= (Int, Char, AnyRef)]
-- Error:
1 |summon[F[((Int, Char), AnyRef)] =:= (Int, Char, AnyRef)]
| ^
| Cannot prove that Int *: Char *:
| (Object match {
| case Tuple => Tuple.Concat[F[Object], F[EmptyTuple.type]]
| case _ => Object *: F[EmptyTuple.type]
| } <: Tuple) =:= (Int, Char, AnyRef).