[Haskell-cafe] ghc 6.4 import problem

Simon Marlow simonmar at microsoft.com
Thu Jun 2 04:26:48 EDT 2005


On 01 June 2005 07:24, Bulat Ziganshin wrote:

> Hello Fergus,
> 
> Tuesday, May 31, 2005, 10:24:41 PM, you wrote:
> 
>>> import Data.Set hiding (map)
>>> import qualified Data.Set as Set
>>> 
>>> will do fine.
> 
>> That code only compiles with ghc 6.4, and won't compile with ghc 6.2:
>> you'll get an error for the "hiding (map)" part, because in 6.2
>> Data.Set does not contain a "map" function.
> 
> btw, question to Simon Marlow and Simon PJ - how about disabling this
> error message?

You mean allowing 

  import M hiding (x)

even if x is not exported by M?  Or making it a warning?

That's certainly possible, but it constitutes an extension to Haskell
98, so it would at least require the -fglasgow-exts flag.  I think
you're better off keeping your code portable.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list