GHCi :set +c causes warnings to be emitted twice
Summary
:set +c
causes warnings to be emitted twice, the second time presumably during Collecting type info for * module(s) ...
Steps to reproduce
Given warn.hs
:
module Nothing where
import Data.List
The following session shows the incorrect behavior
$ ghci -Wall
GHCi, version 8.10.1: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/dram/.ghci
ghci> :l warn.hs
[1 of 1] Compiling Nothing ( warn.hs, interpreted )
warn.hs:3:1: warning: [-Wunused-imports]
The import of ‘Data.List’ is redundant
except perhaps to import instances from ‘Data.List’
To import instances alone, use: import Data.List()
|
3 | import Data.List
| ^^^^^^^^^^^^^^^^
Ok, one module loaded.
ghci>
Leaving GHCi.
$ ghci -Wall
GHCi, version 8.10.1: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/dram/.ghci
ghci> :set +c
ghci> :l warn.hs
[1 of 1] Compiling Nothing ( warn.hs, interpreted )
warn.hs:3:1: warning: [-Wunused-imports]
The import of ‘Data.List’ is redundant
except perhaps to import instances from ‘Data.List’
To import instances alone, use: import Data.List()
|
3 | import Data.List
| ^^^^^^^^^^^^^^^^
Ok, one module loaded.
Collecting type info for 1 module(s) ...
warn.hs:3:1: warning: [-Wunused-imports]
The import of ‘Data.List’ is redundant
except perhaps to import instances from ‘Data.List’
To import instances alone, use: import Data.List()
|
3 | import Data.List
| ^^^^^^^^^^^^^^^^
ghci>
Expected behavior
No warning emitted after Collecting type info for 1 module(s) ...
line
Environment
- GHC version used: 8.10.1
Optional:
- Operating System: Linux
- System Architecture: x86_64