This is the definition of Nat
in package shapeless
:
trait Nat {
type N <: Nat
}
case class Succ[P <: Nat]() extends Nat {
type N = Succ[P]
}
class _0 extends Nat with Serializable {
type N = _0
}
What are the type
declarations for ?
Once removed it seems to me that the definition works equally well.