#7426: import Foo hiding (X) should not be a fatal error when X is not exported 
Reporter:  luqui                      |          Owner:                
    Type:  bug                        |         Status:  new           
Priority:  normal                     |      Component:  Compiler      
 Version:  7.4.1                      |       Keywords:  module, import
      Os:  MacOS X                    |   Architecture:  x86_64 (amd64)
 Failure:  GHC rejects valid program  |      Blockedby:                
Blocking:                             |        Related:                
 We recently got into a situation on a team where two developers had two
 different versions of a module with many exports installed, and we were
 using a compatible subset of both versions.  I then introduced a symbol
 (say X) with the same name as an export from one of the versions.  Because
 GHC raises a fatal error on import Foo hiding (X) when X is not exported
 by Foo, we had no way to have X refer to the local definition -- since if
 hiding (X) was present, my GHC would error, and if it wasn't, he would get
 ambiguous reference errors.

 The alternative would be to list all symbols except X in the import list
 (there were a good couple hundred).  But isn't that what hiding (X) is
 supposed to be short for anyway?

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

Glasgow-haskell-bugs mailing list

Reply via email to