Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

Limited support for the StarIsType syntax in HsExpr
The `StarIsType` extension allows the programmer to write `*` instead of `Type`, e.g. ```haskell Maybe :: * -> * ``` Although it is going to be eventually deprecated per [GHC Proposal #143 "Remove the * kind syntax"](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0143-remove-star-kind.rst), there are currently no plans to fully remove it. Indeed, the proposal uses the following phrasing > the `-XStarIsType` extension **may be removed** from GHC to simplify the internals And "may be removed" only hints at the possibility of removal; given the magnitude of the potential breakage, I don't believe this is going to happen without friction. In other words, realistically, `*` is going to stay with us for a while. With this in mind, I propose to introduce _limited_ support for the `*` syntax that does not conflict with the multiplication operator `*`. Indeed, consider the common kinds * `Maybe :: * -> *` * `Either :: * -> * -> *` * `Monad :: (* -> *) -> Constraint` None of them actually involve the `a * b` ambiguity. This means that with a tactical extension of the `infixexp2` nonterminal, we can continue to support many legacy kind annotations even as we unify terms and types. A nice side effect of this is that `RequiredTypeArguments` is going to interact more smoothly with `StarIsType`. At the moment, the following is a hard parse error: ``` ghci> :set -XRequiredTypeArguments ghci> checkKind :: forall k (t::k) -> String; checkKind _ _ = "ok" ghci> checkKind (* -> *) Maybe <interactive>:3:14: error: [GHC-58481] parse error on input ‘->’ ``` But, with the proposed extension to the syntax, this example is going to work (with appropriate warnings) ``` ghci> :set -XRequiredTypeArguments ghci> checkKind :: forall k (t::k) -> String; checkKind _ _ = "ok" ghci> checkKind (* -> *) Maybe <interactive>:3:12: warning: [GHC-39567] [-Wstar-is-type] Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’ relies on the StarIsType extension, which will become deprecated in the future. Suggested fix: Use ‘Type’ from ‘Data.Kind’ instead. <interactive>:3:17: warning: [GHC-39567] [-Wstar-is-type] Using ‘*’ (or its Unicode variant) to mean ‘Data.Kind.Type’ relies on the StarIsType extension, which will become deprecated in the future. Suggested fix: Use ‘Type’ from ‘Data.Kind’ instead. "ok" ``` I already have a branch that implements this.
issue