Update 8.6 authored by Ryan Scott's avatar Ryan Scott
[[_TOC_]]
# GHC 8.6.x Migration Guide
......@@ -29,10 +31,10 @@ f _ _ = Proxy
Will not typecheck if `StarIsType` is enabled, since `m * n` is treated as if one had written `m Type n`. There are several ways to adapt to this:
1. Use `*` qualified (e.g., `Proxy (m GHC.TypeLits.* n`). This approach is compliant with the GHC three-release policy, as it does not require CPP to support older GHCs.
1. Enable the `NoStarIsType` extension using a `LANGUAGE` pragma. Since `(No)StarIsType` did not exist on older GHCs, this approach will require CPP in order to support older compilers.
1. Conditionally enable the `NoStarIsType` extension using Cabal's `default-extensions` field, like this:
2. Enable the `NoStarIsType` extension using a `LANGUAGE` pragma. Since `(No)StarIsType` did not exist on older GHCs, this approach will require CPP in order to support older compilers.
3. Conditionally enable the `NoStarIsType` extension using Cabal's `default-extensions` field, like this:
```wiki
```
if impl(ghc >= 8.6)
default-extensions: NoStarIsType
```
......@@ -87,7 +89,7 @@ foo b = if | b -> 1
Will now raise a warning in GHC 8.6:
```wiki
```
warning: [-Wincomplete-patterns]
Pattern match(es) are non-exhaustive
In a multi-way if alternative:
......
......