... | ... | @@ -110,7 +110,7 @@ There may be code in the wild that previously depended on the assumption that re |
|
|
|
|
|
|
|
|
|
|
|
GHC 8.8 tightened up the implementation of its unused import warning algorithm to more closely match the specification in [wiki:Commentary/Compiler/UnusedImports](commentary/compiler/unused-imports), as GHC 8.0 inadvertently introduced a [ regression](https://ghc.haskell.org/trac/ghc/ticket/13064) that caused it to stray from this specification. As a result, some programs which compile without warnings on GHC 8.0 through 8.6 will now produce warnings on GHC 8.8. A good example that illustrates this is this one:
|
|
|
GHC 8.8 tightened up the implementation of its unused import warning algorithm to more closely match the specification in [wiki:Commentary/Compiler/UnusedImports](commentary/compiler/unused-imports), as GHC 8.0 inadvertently introduced a [regression](https://ghc.haskell.org/trac/ghc/ticket/13064) that caused it to stray from this specification. As a result, some programs which compile without warnings on GHC 8.0 through 8.6 will now produce warnings on GHC 8.8. A good example that illustrates this is this one:
|
|
|
|
|
|
|
|
|
```
|
... | ... | @@ -169,7 +169,7 @@ foo = () <$ Prelude.pure () |
|
|
### Additions to the `-Wcompat` warning group
|
|
|
|
|
|
|
|
|
As part of [ this GHC proposal](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0030-remove-star-kind.rst), the uses of `*` that rely on the `StarIsType` extension now produce a warning:
|
|
|
As part of [this GHC proposal](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0030-remove-star-kind.rst), the uses of `*` that rely on the `StarIsType` extension now produce a warning:
|
|
|
|
|
|
```wiki
|
|
|
Prelude> type M = (Maybe :: * -> *)
|
... | ... | @@ -260,7 +260,7 @@ f = [] |
|
|
### `template-haskell-2.15.0.0`
|
|
|
|
|
|
|
|
|
The Template Haskell AST has changed to accommodate the [ Visible kind application](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0015-type-level-type-applications.rst) and [ More explicit foralls](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0007-instance-foralls.rst) proposals, both of which debut in GHC 8.8. At a glance, the breaking API changes are as follows:
|
|
|
The Template Haskell AST has changed to accommodate the [Visible kind application](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0015-type-level-type-applications.rst) and [ More explicit foralls](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0007-instance-foralls.rst) proposals, both of which debut in GHC 8.8. At a glance, the breaking API changes are as follows:
|
|
|
|
|
|
```
|
|
|
data Dec
|
... | ... | @@ -293,8 +293,8 @@ The Template Haskell AST has changed to accommodate the [ Visible kind applicati |
|
|
|
|
|
Here are the reasons why each of these had to change, and how one can accommodate these changes:
|
|
|
|
|
|
- `DataInstD`, `NewtypeInstD`, and `TySynEqn` each gained a field of type type `Maybe [TyVarBndr]` to support the [ More explicit foralls](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0007-instance-foralls.rst) proposal, which allows writing type family instances and `RULES` with explicit `forall`s (binding type variables) at the front. (If you don't care about this feature, it's perfectly fine to use `Nothing` here, since that omits the `forall` entirely.)
|
|
|
- Because of the [ Visible kind application](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0015-type-level-type-applications.rst) proposal, type family instances can feature richer arguments than before. For example, this is an example of a type family one can write using visible kind applications:
|
|
|
- `DataInstD`, `NewtypeInstD`, and `TySynEqn` each gained a field of type type `Maybe [TyVarBndr]` to support the [More explicit foralls](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0007-instance-foralls.rst) proposal, which allows writing type family instances and `RULES` with explicit `forall`s (binding type variables) at the front. (If you don't care about this feature, it's perfectly fine to use `Nothing` here, since that omits the `forall` entirely.)
|
|
|
- Because of the [Visible kind application](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0015-type-level-type-applications.rst) proposal, type family instances can feature richer arguments than before. For example, this is an example of a type family one can write using visible kind applications:
|
|
|
|
|
|
```
|
|
|
type family Foo (a :: k) :: k where
|
... | ... | |