deprecation warnings are reported too often
Not so much a bug, more an annoyance.
In some code which is designed to work on multiple compiler platforms, there are some system dependencies such as the name/location of non-standard libraries. Accordingly, I gather all such deps into a single module SysDeps.hs, which is heavily reliant on cpp #ifdefs, but whose only purpose is to re-export the non-standard entities needed by the rest of the project. So far so good. Now it turns out that ghc-6.6 has deprecated some of the non-standard libraries. Fair enough, I would expect to see the deprecation warnings when I compile SysDeps.hs. But in fact, I see multiple deprecation warnings - one for every deprecated entity, used in any module. So instead of seeing 5 or so warnings, nicely localised to a single module, I see 40 or so, smeared out across the whole project.
An example:
Import.hs:9:28:
Warning: Deprecated use of `unpackPS'
(imported from SysDeps, but defined in Data.PackedString):
use Data.ByteString, Data.ByteString.Char8, or plain String.
As you can see, the warning mechanism is aware that it is doing a transitive closure over imports. But really, I'd prefer it not to, and instead to report the deprecation only in the directly-importing module.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Multiple |
| Architecture | Multiple |