Вам может потребоваться неявное IsTuple
:
object flatten extends LowPriorityFlatten {
implicit def caseTuple[P <: Product : IsTuple]
(implicit lfm: Lazy[FlatMapper[P, flatten.type]]) =
at[P](lfm.value(_))
}
Тест:
val v4 = (Bar(Foo("a")), (true, 2.0, "foo"))
val f4 = flatten(v4)
typed[(Bar, Boolean, Double, String)](f4)