Skip to content

Instantly share code, notes, and snippets.

@ClintCombs
Last active May 14, 2021 16:43
Show Gist options
  • Select an option

  • Save ClintCombs/629302f25fea161aa0b1c132e3c16c88 to your computer and use it in GitHub Desktop.

Select an option

Save ClintCombs/629302f25fea161aa0b1c132e3c16c88 to your computer and use it in GitHub Desktop.
// Ongoing thoughts about kinds in shapeless 3 and Scala 3.
// See the shapeless discussion here: https://discord.com/channels/632277896739946517/632312089616056350
trait BaseKind // AnyKind in Scala 3.x?
type Kind = Tuple | BaseKind
object K0 extends BaseKind {
override def toString: String = "*"
def *:(k: Kind): Tuple = (k, K0)
}
val K1: Kind = K0 *: K0
val K11: Kind = K1 *: K0
val K2: Kind = K0 *: K0 *: K0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment