Looking at the sources for the shapeless library, I drew attention to the various declarations of a member of a higher type and wondered if he had any particular difference in use. For example, a common attribute here :
trait Generic1[F[_], FR[_[_]]] { type R[t] // ... } trait IsHCons1[L[_], FH[_[_]], FT[_[_]]] { type H[_] // ... }
One type member is declared with common syntax for type constructors (ie H[_] ) and Generic1 has R[t] . Although auxiliary type aliases are defined in the same way:
object Generic1 { type Aux[F[_], FR[_[_]], R0[_]] = Generic1[F, FR] { type R[t] = R0[t] } // ... } object IsHCons1 { type Aux[L[_], FH[_[_]], FT[_[_]], H0[_], T0[_] <: HList] = IsHCons1[L, FH, FT] { type H[t] = H0[t] ; type T[t] = T0[t] } // ... }
So, is it interesting that R[t] and H[_] have any difference or not?
source share