It restricts the type of the head and tail.
If you want Seq[_] elements in your HList, try this:
case class A[L <: HList](list: Seq[_] :: L)(implicit val c: LUBConstraint[L, Seq[_]]) {
def head: Seq[_] = list.head
}
A(Seq("Hello") :: HNil)
A(Seq("Hello") :: Seq("World") :: HNil)
A(Seq("Hello") :: Seq(42, 42f, "Blah") :: HNil)
val blah = A(Seq("Hello") :: Seq(42, 42f, "Blah", java.awt.Color.red) :: HNil)
val theHead: Seq[Any] = blah.head
// Doesn't compile, as expected.
// A(42 :: HNil)
Does that help?
Cheers,
William