Improve or remove the glomming warning
In the GHC build log there's lots of warnings about "glomming" but they are not actionable.
The first problem is understanding what glomming is, that much is explained in the Note [Glomming]
,
In my own words, in the occurence analyser there are situations where there are out of scope top-level bindings. This usually happens when a rule is fired which drops in a new binding which does not appear anywhere else other than in rules.
GHC dutifully warns us about this event but I can't work out why it this is necessary. What is bad about glomming? It seems like normal and expected behaviour for this to happen, further, there isn't really anything you can do about it.
If it is a worthwhile warning to investigate, then the debugging output should be improved as the output is currently a list of uniques with occurence information which is difficult to map to source files. It would be much more useful to display the user-level names of the glommed identifiers.
For a real world example look in Data.Maybe
, compiling this module with a debugging compiler will emit a warning about glomming because of mapMaybeFB
which appears on the RHS of rules but not anywhere else in a module.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |