import Foo hiding (X) should not be a fatal error when X is not exported by Foo
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?
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.4.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |