#3419: Incorrect "unnecessary import" warning
---------------------------------+------------------------------------------
    Reporter:  NeilMitchell      |        Owner:                  
        Type:  bug               |       Status:  new             
    Priority:  normal            |    Milestone:                  
   Component:  Compiler          |      Version:  6.10.4          
    Severity:  normal            |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Changes (by simonpj):

  * difficulty:  => Unknown

Comment:

 As it happens, the HEAD says
 {{{
 bash-3.2$ ~/builds/HEAD/inplace/bin/ghc-stage2 -c T3419.hs

 T3419.hs:4:0:
     Warning: The import of `Data.Data' is redundant
                except perhaps to import instances from `Data.Data'
              To import instances alone, use: import Data.Data()
 }}}
 but we are making an arbitrary choice here; either import can be omitted
 without making the program fail to compile.  Still, I don't think it's
 right to say nothing here; after all, only one of those imports is needed.
 Why do you think that "the current behaviour is incorrect"?.

 See [wiki:Commentary/Compiler/UnusedImports] for what we've now done in
 the HEAD.
 Feel free to suggest specifications other than the one given there.  For
 example, you could say that the "home module" of an entity dominates, so
 in this case pick `Data.Typeable` over `Data.Data`. That might be why your
 nose twitched?

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3419#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to