Am Freitag, 27. Mai 2005 02:06 schrieb Shiqi Cao: > Hi, > > I tried to port some code from ghc 6.2 to ghc 6.4, but I got the > following error > > PrelExts.lhs:41:25: > Ambiguous occurrence `map' > It could refer to either `GHC.Base.map', imported from Data.List at > PrelExts.lhs:11:0-15 > or `Data.Set.map', imported from Data.Set at > PrelExts.lhs:10:0-14 > > The following is the first part of the code > > module PrelExts where > > import Data.FiniteMap > import Data.Set > import Data.List > import IO > > There is no problem under ghc 6.2. What should I do? > > > Shiqi Cao
The module Set has undergone major changes - look at the code and admire, if you have it. Formerly sets were implemented as 'FiniteMap's, now as size-balanced trees. Formerly there was a function called 'mapSet', now there's 'map'. To solve your problem, use import controls, for example import Data.Set hiding (map) import qualified Data.Set as Set will do fine. BTW, module FiniteMap is deprecated (I don't know why). Cheers, Daniel _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
