[GHC] #14881: Consistent labeling of redundant, qualified imports

GHC ghc-devs at haskell.org
Fri Mar 2 22:37:59 UTC 2018


#14881: Consistent labeling of redundant, qualified imports
-------------------------------------+-------------------------------------
           Reporter:  crockeea       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  lowest         |         Milestone:
          Component:  Compiler       |           Version:  8.2.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Poor/confusing
  Unknown/Multiple                   |  error message
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{
 import Data.Map as M (Map, adjust, lookup, fromList)
 foo :: Map Int Int
 foo = fromList []
 }}}

 GHC helpfully suggests:
 {{{
 Bug.hs:3:1: warning: [-Wunused-imports]
     The import of `adjust, M.lookup'
     from module `Data.Map' is redundant
   |
 3 | import Data.Map as M (Map, adjust, lookup, fromList)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 }}}

 However, this message can be improved. Notice that in the line "The import
 of ...", `adjust` is *not* qualified, while `lookup` *is* qualified. It
 would be better if this was consistent.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14881>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list