... | ... | @@ -84,6 +84,8 @@ The new proposal is this: |
|
|
|
|
|
- An open type family always has a CUSK -- unannotated type variables (and return type) default to `*`. (This is not a change.)
|
|
|
|
|
|
- **Update for `TypeInType`:** If `-XTypeInType` is in effect, any top-level kind given to a datatype must introduce all of its kind variables explicitly, allowing `data X :: forall k. k -> *` but saying that `data X :: k -> *` does not have a CUSK.
|
|
|
|
|
|
|
|
|
This is somewhat simpler, it covers classes. See [comment:19:ticket:9200](https://gitlab.haskell.org//ghc/ghc/issues/9200) for more exposition.
|
|
|
This change alone is enough to satisfy [\#9200](https://gitlab.haskell.org//ghc/ghc/issues/9200).
|
... | ... | @@ -105,6 +107,11 @@ Examples: |
|
|
type family F a where ... -- No CUSK (neither arg nor result annotated)
|
|
|
```
|
|
|
|
|
|
|
|
|
If a datatype has a CUSK and its kind has any unsolved metavariables after inference (possible with `-XTypeInType`), an error is reported.
|
|
|
|
|
|
**Reasons for Update:** It's nice to be able to say `data X :: Proxy k -> *` and get inference to be able to deduce that you mean `X :: forall j (k :: j). Proxy k -> *`. Of course, this is possible only with `-XTypeInType`, so we make it a tad harder to specify a CUSK. Ideally, we'll one day move to a separate `type X :: <X's kind>` syntax that will obviate this delicate syntactic definition.
|
|
|
|
|
|
## A possible variation
|
|
|
|
|
|
**RAE:** This variation is partially implemented in tag `re-sort-non-cusk-decls` at [ my GitHub fork](https://github.com/goldfirere/ghc). It is tracked in ticket [\#9427](https://gitlab.haskell.org//ghc/ghc/issues/9427).
|
... | ... | |