RE: Re[2]: [Haskell-cafe] ghc 6.4 import problem

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

Hello Simon, Thursday, June 02, 2005, 12:26:48 PM, you wrote: SM> You mean allowing SM> import M hiding (x) SM> even if x is not exported by M? Or making it a warning? yes. i think that warning will be enough - it will compile silently with new library versions and give warning, but still compile, when we use old version of module M SM> That's certainly possible, but it constitutes an extension to Haskell SM> 98, so it would at least require the -fglasgow-exts flag. I think SM> you're better off keeping your code portable. my own code in any case use many GHC-specific tricks, so for me personally it is acceptable -- Best regards, Bulat mailto:bulatz@HotPOP.com
participants (2)
-
Bulat Ziganshin
-
Simon Marlow