shapeless
The CNil type is used to terminate a 'list' of :+: alternatives.
Like the Nil constructor of List, it does not convey real information. This is achieved by not having any value for CNil.
This makes the type Int :+: CNil equivalent to Int, because the right (Inr) alternative of :+: can not be constructed properly.
Int :+: CNil
Int
Inr
:+:
The CNil type is used to terminate a 'list' of :+: alternatives.
Like the Nil constructor of List, it does not convey real information. This is achieved by not having any value for CNil.
This makes the type
Int :+: CNil
equivalent toInt
, because the right (Inr
) alternative of:+:
can not be constructed properly.