#1911: -w doesn't turn off nullModuleExport
---------------------------+------------------------------------------------
 Reporter:  AndreaRossato  |          Owner:  AndreaRossato
     Type:  bug            |         Status:  assigned     
 Priority:  normal         |      Milestone:  6.10 branch  
Component:  Compiler       |        Version:  6.8.1        
 Severity:  minor          |     Resolution:               
 Keywords:                 |     Difficulty:  Easy (1 hr)  
 Testcase:                 |   Architecture:  Multiple     
       Os:  Multiple       |  
---------------------------+------------------------------------------------
Comment (by AndreaRossato):

 Hi Neil,

 I don't think I entirely understand your message. Here warn-unused-imports
 is off by default, that is to say, I need to use -fwarn-unused-imports to
 have the warning reported.

 And, more important, it's use seems to be unrelated to the
 nullModuleExport, which is always reported when a module exports a second
 module which (the second) does not export anything.

 To explain:
 1. Module A:

 module A ( module B ) where
 import module B

 Module B:
 module B where

 Compiling A reports a waring:
 A.hs:1:11: Warning: The export item `module B' exports nothing

 This warning is not suppressed by "-w". And it is unrelated to -fno-warn-
 unused-imports, since A is actually using the export.

 Am I missing something?

 Both this one and the one reported by Simon are generated by the renamer
 and indeed there are no checks for flags.

 (In the meantime I'm preparing the list of unflagged warnings and reading
 this wiki for preparing a patch that complies with the style and the
 guidelines for contributors - which is a useful reading anyhow).

 Andrea

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1911#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to