Skip to content

Instantly share code, notes, and snippets.

@calippo
Last active August 29, 2017 11:10
Show Gist options
  • Save calippo/562cb176437ff264ec4e8b888d55143f to your computer and use it in GitHub Desktop.
Save calippo/562cb176437ff264ec4e8b888d55143f to your computer and use it in GitHub Desktop.
Given a sealed trait A and a case class B, force the case class to have as parameters all and only the known subclasses of A (at compile time with shapeless)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment