First off, most shapeless discussion now happens on Gitter
(
https://gitter.im/milessabin/shapeless) and this mailing list is now
deprecated in favour of the Typelevel mailing list,
https://groups.google.com/group/typelevel
I think what you're doing looks more or less along the right lines.
Because you want a List[Any] to feed into the Tuple constructor you
don't actually need any structure in the HList argument, so something
like this ought to do the trick,
implicit def hListSetter[L <: HList, N <: Nat]
(implicit tl: ToList[L, Any], len: Length.Aux[L, N], ti: ToInt[N]):
TupleSetter[L] =
new TupleSetter[L] {
override def apply(arg: L): Tuple = {
val argList: List[Any] = arg.toList
new Tuple(argList:_*)
}
override def arity: Int = ti()
}
Cheers,
Miles
--
Miles Sabin
tel:
+44 7813 944 528
skype: milessabin
gtalk:
mi...@milessabin.com
g+:
http://www.milessabin.com
http://twitter.com/milessabin