... | ... | @@ -5,6 +5,20 @@ This page gives additional implementation details for the `-XPolyKinds` flag. Th |
|
|
|
|
|
# Explicit kind variables
|
|
|
|
|
|
|
|
|
Currently we do not handle kind variables in the source language. So the following is invalid, for instance:
|
|
|
|
|
|
```wiki
|
|
|
type family Apply (f :: k1 -> k2) (a :: k1)
|
|
|
```
|
|
|
|
|
|
|
|
|
Naturally we want to allow this. The syntax we propose is the one above, as described in the paper.
|
|
|
(At least until [ExplicitTypeApplication](explicit-type-application) gets implemented.)
|
|
|
|
|
|
**Future work:** allow kind variable annotation.
|
|
|
Since the core language has all the support for kind variables, this shouldn't be too hard.
|
|
|
|
|
|
# Kind defaulting in type families
|
|
|
|
|
|
# [ \#5682](http://hackage.haskell.org/trac/ghc/ticket/5682) (proper handling of infix promoted constructors)
|
... | ... | @@ -206,3 +220,10 @@ require type/kind signatures for kind polymorphic stuff, so then |
|
|
can be used to type check generalised algebraic kinds, avoiding the need for
|
|
|
coercions. While this would still require some implementation effort, it
|
|
|
should be "doable".
|
|
|
|
|
|
# Better support for kinds in Template Haskell
|
|
|
|
|
|
|
|
|
Currently there is no support for promoted datatypes, or the kind `Constraint`, in Template Haskell.
|
|
|
|
|
|
**Future work:** address [ \#5612](http://hackage.haskell.org/trac/ghc/ticket/5612), designing and implementing a way for Template Haskell to reify the new kinds. |