次のような別の方法でShapeless Polyを使用しようとしています。
object poly extends Poly1 {
implicit val caseInt = at[Int](_.toString)
implicit val caseString = at[String](_.toString)
}
def f[A, P <: Poly](a: A, p: P) = println(p(a))
これは与える
could not find implicit value for parameter cse: shapeless.poly.Case[p.type,shapeless.::[A,shapeless.HNil]]
これを機能させる方法について何か提案はありますか?