... | @@ -19,10 +19,16 @@ importGHC.TypeLitsf::Proxy m ->Proxy n ->Proxy(m * n)f__=Proxy |
... | @@ -19,10 +19,16 @@ importGHC.TypeLitsf::Proxy m ->Proxy n ->Proxy(m * n)f__=Proxy |
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
Will not typecheck if `StarIsType` is enabled, since `m * n` is treated as if one had written `m Type n`. There are two ways to adapt to this:
|
|
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. 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. Since `(No)StarIsType` did not exist on older GHCs, this approach will require CPP in order to support older compilers.
|
|
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:
|
|
|
|
|
|
|
|
```wiki
|
|
|
|
if impl(ghc >= 8.6)
|
|
|
|
default-extensions: NoStarIsType
|
|
|
|
```
|
|
|
|
|
|
### `MonadFailDesugaring` by default
|
|
### `MonadFailDesugaring` by default
|
|
|
|
|
... | | ... | |