[GHC] #13336: Improve or remove the glomming warning

#13336: Improve or remove the glomming warning -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: task | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13336 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13336: Improve or remove the glomming warning -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: task | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj):
GHC dutifully warns us about this event but I can't work out why it this is necessary
The actionable bit (not yet actioned!) is to examine cases where glomming happens a lot, and check that it is actually necessary. They may all be legit, but I know from experience that I make mistakes; perhaps there is an easy win lurking here.
What is bad about glomming?
Two small things: first, the program is optimised without all the relevant bindings visible; second, we build a giant Rec and re-analyse it, which can't be cheap. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13336#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC