... | ... | @@ -101,6 +101,33 @@ Foo.hs:4:26: |
|
|
|
|
|
This can be fixed by helping GHC's type-inference to pin down `"team"` to `[Char]`, either by adding a `:: String` to the string literal, or (for short literals) by using list-syntax (i.e. `['t','e','a','m']`).
|
|
|
|
|
|
#### GHC says `The import of ... is redundant`
|
|
|
|
|
|
|
|
|
With `base-4.8`, the `Prelude` re-exports a few more entities from modules such as `Data.Monoid` and `Control.Applicative`. For example, the following module
|
|
|
|
|
|
```
|
|
|
moduleFoo(Int,Word,Monoid(..))whereimportData.MonoidimportData.Word-- import Prelude
|
|
|
```
|
|
|
|
|
|
|
|
|
will result in two redundant import warnings with GHC 7.10.1 (under `-Wall`):
|
|
|
|
|
|
```wiki
|
|
|
foo.hs:3:1: Warning:
|
|
|
The import of ‘Data.Monoid’ is redundant
|
|
|
except perhaps to import instances from ‘Data.Monoid’
|
|
|
To import instances alone, use: import Data.Monoid()
|
|
|
|
|
|
foo.hs:4:1: Warning:
|
|
|
The import of ‘Data.Word’ is redundant
|
|
|
except perhaps to import instances from ‘Data.Word’
|
|
|
To import instances alone, use: import Data.Word()
|
|
|
```
|
|
|
|
|
|
|
|
|
One obvious way to silence such warnings is use `-XCPP`. However, there's also a less-known trick/hack to moving the implicit `import Prelude` into an explicit one after all `base`-imports. In the code example above just de-comment the `-- import Prelude` line.
|
|
|
|
|
|
### `deepseq-1.4.0.0`
|
|
|
|
|
|
|
... | ... | |