[GHC] #7426: import Foo hiding (X) should not be a fatal error when X is not exported by Foo
GHC
cvs-ghc at haskell.org
Sat Nov 17 21:24:55 CET 2012
#7426: import Foo hiding (X) should not be a fatal error when X is not exported by
Foo
--------------------------------------+-------------------------------------
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
More information about the Glasgow-haskell-bugs
mailing list