#3420: Missing warning on duplicate import
-----------------------------+----------------------------------------------
Reporter:  NeilMitchell      |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  6.10.4            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 The following program does not give a warning:

 {{{
 {-# OPTIONS_GHC -Wall #-}
 import Data.List
 import Data.List

 main :: IO ()
 main = print $ sort "hello"
 }}}

 But this program does:

 {{{
 {-# OPTIONS_GHC -Wall #-}

 import Data.List(sort)
 import Data.List

 main :: IO ()
 main = print $ sort "hello"
 }}}

 with:

 {{{
     Warning: Redundant import of: `sort'
              It is also imported from Data.List at Test.hs:4:0-15
 }}}

 It seems surprising that 100% identical imports aren't given as warnings,
 as in the first example.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3420>
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