I noticed with PolyKinds
and DataKinds
the following compiles fine:
data Pair a b
data Test = Test
type Test2 = Pair 'Test 'Test
However:
type Test3 = ('Test, 'Test)
fails, presumably as (,)
is not kind polymorphic, which makes sense as it makes values out of it's type arguments and you can't make values of types which are not of kind *
.
Is there a library that has kind polymorphic tuples (to save me reinventing the wheel)?
I do realise that that unlike real tuples, kind polymorphic tuples will only exist on the type level, but that's all I need for my purposes.