Shapeless: restricting case class types
问题 (NOTE: split from Shapeless: Trying to restrict HList elements by their type and Shapeless: own HList constraint using Coproduct ) Question 3 - restrict case classes by parameter types A very nice additional gain would be, if I could use HList constraints to constrain case class only to be built from AnyVals, Strings, and a specific MyBaseTrait, that recursively fulfill the same constraint. The constraint being defined on the base trait and not to have to touch any derived case class would be