logo       

unused import not always reported: msg#00057

lang.haskell.glasgow.bugs

Subject: unused import not always reported

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@turing:~/haskell/HetCATS> ll GUI/Main.hi
maeder@turing:~/haskell/HetCATS> ll GUI/Main.hi
-rw-r--r-- 1 maeder wimi 5272 2003-03-21 16:47 GUI/Main.hi
maeder@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@turing:~/haskell/HetCATS> ll GUI/Main.hi
-rw-r--r-- 1 maeder wimi 5840 2003-03-21 16:48 GUI/Main.hi


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise