Type class and dependent type based generic programming for Scala
open sourceApache-2.0free
shapeless is a generic programming library for Scala built on type classes and dependent types, for abstracting over arities and scrapping boilerplate: heterogeneous lists (HList) and the like. It started in Miles Sabin's 2011 talks on scrap your boilerplate and higher rank polymorphism in Scala and is used in production systems. It's part of the Typelevel family of projects, with builds for Scala 2.11, 2.12 and 2.13 and for Scala.js, published to Maven Central as com.chuusai artifacts.
Problems it solves
- derive type class instances for case classes generically in Scala
- abstract over tuples and case classes of any arity in Scala
- remove boilerplate for working with many case classes the same way in Scala
Features
- HList and type class based generic programming
- abstracting over arity
- builds for Scala 2.11, 2.12 and 2.13
- Scala.js builds
- a try-shapeless script for an instant Ammonite REPL
