| 5 | | A tolevel kind signature consists of a type declaration head using `family` as a special following the declaration keyword. It is optionally followed by a `::` and a kind (which is by default `*` if not specified). In the case of a data declaration, we addititonally require that there is no `where` clause. In associated kind signature, the `family` special is dropped, but the kind is currently compulsory. Toplevel indexed type defintions, use the `instance` keyword after the main declarations keyword; associated declarations don't use `instance`. We require for every definition of an indexed type (i.e., type equations or indexed data/newtype declaration) that a matching kind signature is in scope. Vanilla type synonym definitions and data/newtype declarations fall out as special cases of type function equations and indexed type declarations that have variable-only patterns, for which we require no kind signatures. The vanilla forms are also closed (further definitions would be useless, as they are bound to overlap). |
| | 5 | A tolevel kind signature consists of a type declaration head using `family` as a special following the declaration keyword. It is optionally followed by a `::` and a kind (which is by default `*` if not specified). In the case of a data declaration, we addititonally require that there is no `where` clause. In associated kind signature, the `family` special is dropped. Toplevel indexed type defintions, use the `instance` keyword after the main declarations keyword; associated declarations don't use `instance`. We require for every definition of an indexed type (i.e., type equations or indexed data/newtype declaration) that a matching kind signature is in scope. Vanilla type synonym definitions and data/newtype declarations fall out as special cases of type function equations and indexed type declarations that have variable-only patterns, for which we require no kind signatures. (However, we also allow variable-only instances of indexed types.) The vanilla forms are also closed (further definitions would be useless, as they are bound to overlap). |