
I think we all agree that we should collapse -XPolyKinds and -XTypeInType. The only issue is what to do about *. No solution is perfect: let's get this decided!
The status quo is terrible!
* With -XTypeInType,
- '*' means Type iff '*' is imported from Data.Kind
- '*' has no special meaning otherwise; that is, it's an
ordinary infix operator, and is used as such in TypeLits
- Ambiguity error if it is in scope two ways)
* Without -XTypeInType
- '*' means Type iff it is used in a context that syntactically
means "this is a kind"
- '*' has no special meaning otherwise
That is, the meaning of '*' depends both on the extension flags -- and moreover on a flag whose primary purpose is quite separate -- AND depends (in some cases) on lexical scope or (in other cases) on syntactic context. This is a ridiculous design.
The simplest thing to do is to say
* The meaning of '*' is controlled by a flag, -XStarIsType, that has no
other purpose
* -XStarIsType is on by default. (Perhaps: switched off by -XTypeOperators.)
* 'Type' is exported by Data.Type (or whatever) and is always available
as an alternative to '*'.
* When -XStarIsType is on, we print '*' in error messages whenever possible.
That is simple and explicable. Moreover the on-by-default rule means that most existing prams that use PolyKinds will continue to work unchanged. In effect -XStarIsType is roughly the delta between -XPolyKinds and -XTypeInType.
Once that is in place we can think about future policy. For example
- Leave it alone
- Announce that -XStarIsType will move to off-by-default in a
specified future GHC XX.YY,
and emit deprecation messages for three previous releases
But let's get this done, one way or another.
Simon
| -----Original Message-----
| From: ghc-steering-committee