unused import not always reported

Christian Maeder maeder at tzi.de
Fri Mar 21 10:52:10 EST 2003


How is it possible that an unused import warning is not always emitted?

Below I get a warning when I recompile everything, but no warning when I 
only recompile the Main module (that contains the unused import). In 
fact Main.hi changes.

Cheers Christian

Compiling GUI.ConvertDevToAbstractGraph ( 
GUI/ConvertDevToAbstractGraph.hs, GUI/ConvertDevToAbstractGraph.o )
Compiling Main             ( GUI/hetdg.hs, GUI/hetdg.o )

GUI/hetdg.hs:1:
     Warning: Module `Data.IORef' is imported, but nothing from it is used
              (except perhaps to re-export instances visible in 
`Data.IORef')
ghc: linking ...
maeder at turing:~/haskell/HetCATS> ll GUI/Main.hi
maeder at turing:~/haskell/HetCATS> ll GUI/Main.hi
-rw-r--r--    1 maeder   wimi         5272 2003-03-21 16:47 GUI/Main.hi
maeder at turing:~/haskell/HetCATS> rm GUI/Main.hi


[omitted the list of Skipping after ghc --make -fglasgow-exts 
-fwarn-unused-imports ...]

Skipping  GUI.ConvertDevToAbstractGraph ( 
GUI/ConvertDevToAbstractGraph.hs, GUI/ConvertDevToAbstractGraph.o )
Compiling Main             ( GUI/hetdg.hs, GUI/hetdg.o )
ghc: linking ...
maeder at turing:~/haskell/HetCATS> ll GUI/Main.hi
-rw-r--r--    1 maeder   wimi         5840 2003-03-21 16:48 GUI/Main.hi







More information about the Glasgow-haskell-bugs mailing list