I'm trying to get a LabelledGeneric instance from a tagged type coming from another HList (another LabelledGeneric to be exact), but the compiler yields me an error saying that it cannot find the implicit.
The exact error is (enabling -x-log-implicits):
shapeless.this.DefaultSymbolicLabelling.mkDefaultSymbolicLabelling is not a valid implicit value for shapeless.DefaultSymbolicLabelling.Aux[Inner with shapeless.labelled.KeyTag[Symbol with shapeless.tag.Tagged[String("c")],Inner],K] because:
hasMatchingSymbol reported error: Inner with shapeless.labelled.KeyTag[Symbol with shapeless.tag.Tagged[String("c")],Inner] is not case class like or the root of a sealed family of types
This is the snippet:
case class Inner(a: Int)
case class Outer(b: Int, c: Inner)
val gen = LabelledGeneric[Outer]
val inner = Inner(1)
val outer = Outer(2, inner)
def getGen[A, L](x: A)(implicit gen: LabelledGeneric.Aux[A, L]) = gen
val hOuter = gen.to(outer)
getGen(hOuter.at(1))
Am I missing something obvious here?
Thanks.
EDIT:
I added the definitions of the case classes. I'm also using scala 2.11.8 and shapeless 2.3.0