V1
represents types without constructorsHaskell allows us to define types without constructors:
data Unicorn
Without constructors it’s impossible to create values of this type, but they can be useful for type-level programming.
For generics representations of types like Unicorn
, we need to put
a type in the spot where normally the type’s constructors would go.
That type is V1
.
data V1 p