#1249: Data.Map.map should be deprecated/removed
-----------------------------+----------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |          Owner:             
     Type:  proposal         |         Status:  new        
 Priority:  normal           |      Milestone:             
Component:  libraries/base   |        Version:  6.6        
 Severity:  minor            |     Resolution:             
 Keywords:                   |     Difficulty:  Easy (1 hr)
 Testcase:                   |   Architecture:  Multiple   
       Os:  Multiple         |  
-----------------------------+----------------------------------------------
Comment (by duncan):

 1. Its name clashes with an extremely commonly-used Prelude function. This
 makes the first import of Data.Map into an existing module very expensive.
 Either all existing instances of "map" need to be qualified, or the import
 of Data.Map needs to be qualified (which works, but makes (!) and (\\)
 unnecessarily inelegant), or the import must hide map.

 Data.Map is supposed to be imported qualified. As it says in the
 [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Map.html
 haddock docs] {{{Data.Map}}} is supposed to be imported qualified:
 {{{
 import Data.Map (Map)
 import qualified Data.Map as Map
 }}}
 then you can use {{{Map.map}}} which now doesn't clash with anything and
 you don't need to change any existing stuff in your code.

 If you don't like using the ugly {{{Map.!}}} and {{{Map.\\}}} you can
 always use {{{Map.lookup}}} and {{{Map.difference}}} instead or if you
 really want those operators and not the array / list versions then you can
 import them unqualified and hide or qualify the array / list versions.

 I don't see any problem here.

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