Why it matters

Shapeless underlies much Scala magic. Understanding shapes advanced Scala.

Advertisement

The architecture

HList: heterogeneous list.

Generic[T]: convert case class to HList.

Shapeless featuresHListheterogeneousGeneric[T]case class ↔ HListType classesover genericsScala 3: much of shapeless functionality via native features (mirrors)
Shapeless.
Advertisement

How it works end to end

Coproduct: type-level Either.

Type-level programming.

Compile-time computation.

Scala 3: less needed due to native metaprogramming.